public static < T > T parse ( ByteBuffer encoded , Class < T > containerClass ) throws Asn1DecodingException { BerDataValue containerDataValue ; try { containerDataValue = new ByteBufferBerDataValueReader ( encoded ) . readDataValue ( ) ; } catch ( BerDataValueFormatException e ) { throw new Asn1DecodingException ( "Failed to decode top-level data value" , e ) ; } if ( containerDataValue == null ) { throw new Asn1DecodingException ( "Empty input" ) ; } return parse ( containerDataValue , containerClass ) ; }
Returns the ASN . 1 structure contained in the BER encoded input .