question: public java . security . cert . Certificate engineGenerateCertificate ( InputStream in ) throws CertificateException { if ( currentStream == null ) { currentStream = in ; sData = null ; sDataObjectCount = 0 ; } else if ( currentStream != in ) { currentStream = in ; sData = null ; sDataObjectCount = 0 ; } try { if ( sData != null ) { if ( sDataObjectCount != sData . size ( ) ) { return getCertificate ( ) ; } else { sData = null ; sDataObjectCount = 0 ; return null ; } } PushbackInputStream pis = new PushbackInputStream ( in ) ; int tag = pis . read ( ) ; if ( tag == - 1 ) { return null ; } pis . unread ( tag ) ; if ( tag != 0x30 ) { return readPEMCertificate ( pis ) ; } else { return readDERCertificate ( new ASN1InputStream ( pis ) ) ; } } catch ( Exception e ) { throw new ExCertificateException ( e ) ; } }
target:  Generates a certificate object and initializes it with the data read from the input stream inStream.