public static int getLength(byte[] raw) {
        try (final Asn1InputStream is = new Asn1InputStream(raw)) {
            is.readTag();
            return is.readLength();
        }
    }
@Test
    public void getLengthSingleByte() {
        final byte[] data = new byte[0x7f];
        final byte[] obj = Arrays.concatenate(new byte[] { 0x10, (byte) 0x7f }, data);
        assertEquals(0x7f, Asn1Utils.getLength(obj));
    }