@Test public void testInteger() throws Exception { SequenceWithIntegers container = parse("301e" + "0201ff" + "0207ff123456789abc" + "0200" + "020280ff" + "020a00000000000000001234", SequenceWithIntegers.class); assertEquals(-1, container.n1); }
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); }
Asn1BerParser { 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); } }
Asn1BerParser { 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); } private  Asn1BerParser(); }
Asn1BerParser { 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); } private  Asn1BerParser(); static T parse(ByteBuffer encoded, Class<T> containerClass); static List<T> parseImplicitSetOf(ByteBuffer encoded, Class<T> elementClass); }
Asn1BerParser { 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); } private  Asn1BerParser(); static T parse(ByteBuffer encoded, Class<T> containerClass); static List<T> parseImplicitSetOf(ByteBuffer encoded, Class<T> elementClass);  }