use of org.openmuc.jasn1.compiler.tagging_test.ExplicitlyTaggedSeqOf in project jasn1 by openmuc.
the class TaggingTest method explicitlyTaggedSeqOfTest.
@Test
public void explicitlyTaggedSeqOfTest() throws Exception {
ExplicitlyTaggedSeqOf seqOf = new ExplicitlyTaggedSeqOf();
List<BerInteger> integerList = seqOf.getBerInteger();
integerList.add(new BerInteger(3));
integerList.add(new BerInteger(4));
ReverseByteArrayOutputStream os = new ReverseByteArrayOutputStream(1000);
seqOf.encode(os);
System.out.println("seqOf : " + DatatypeConverter.printHexBinary(os.getArray()));
Assert.assertArrayEquals(DatatypeConverter.parseHexBinary("BF21083006020103020104"), os.getArray());
seqOf = new ExplicitlyTaggedSeqOf();
seqOf.decode(new ByteArrayInputStream(os.getArray()));
}
Aggregations