question: public X509CertImpl ( InputStream in ) throws CertificateException { DerValue der = null ; BufferedInputStream inBuffered = new BufferedInputStream ( in ) ; try { inBuffered . mark ( Integer . MAX_VALUE ) ; der = readRFC1421Cert ( inBuffered ) ; } catch ( IOException ioe ) { try { inBuffered . reset ( ) ; der = new DerValue ( inBuffered ) ; } catch ( IOException ioe1 ) { throw new CertificateException ( "Input stream must be " + "either DER-encoded bytes " + "or RFC1421 hex-encoded " + "DER-encoded bytes: " + ioe1 . getMessage ( ) , ioe1 ) ; } } try { parse ( der ) ; } catch ( IOException ioe ) { signedCert = null ; throw new CertificateException ( "Unable to parse DER value of " + "certificate, " + ioe , ioe ) ; } }
target:  unmarshals an X.509 certificate from an input stream.  If the certificate is RFC1421 hex-encoded, then it must begin with the line X509Factory.BEGIN_CERT and end with the line X509Factory.END_CERT.