Data { public int getByte() { int ret = data[pointer] & 0xFF; pointer++; return ret; } Data(byte[] data); int getUnsignedInt(); int getByte(); char getChar(); long getLongInteger(); String getString(); byte[] getBuffer(); String getPointer(); long getTime(); Hashtable getHashtable(); Hdata getHdata(); Info getInfo(); Infolist getInfolist(); Array getArray(); RelayObject getObject(); byte[] getByteArray(); boolean empty();  }
@Test public void testGetByte() { for (int o = 0; o < 256; o++) { Data d = new Data(new byte[] { (byte) (o & 0xFF) }); int b = d.getByte(); assertEquals(o, b); } }