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