Tag { public int getTagNumber() { return tagNumber; } Tag(int tagNumber, byte tagClass, TagType tagType, int tagSize);  Tag(byte[] binary, int offset); int getTagNumber(); byte getTagClass(); TagType getTagType(); int getTagSize(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final byte UNIVERSAL; static final byte APPLICATION; static final byte CONTEXT; static final byte PRIVATE; }
@Test public void getTagNumber() { Tag tag; tag = new Tag(0x55, Tag.APPLICATION, Tag.TagType.PRIMITIVE, 2); Assert.assertEquals(0x55, tag.getTagNumber()); tag = new Tag(ByteArrayUtil.fromHex("BF550100"), 0); Assert.assertEquals(0x55, tag.getTagNumber()); }