@Test public void readZero() throws IOException { InputStream given = new ByteArrayInputStream(new UINT32(BigInteger.valueOf(0)).bytes()); UINT32 expected = new UINT32(BigInteger.valueOf(0)); UINT32 actual = UINT32.read(given); assertThat(actual, is(expected)); }
public static UINT32 read(InputStream is) throws IOException { byte[] bytes = new byte[SIZE_IN_BYTES]; if (is.read(bytes) != SIZE_IN_BYTES) { throw new EOFException(); } return new UINT32(bytes); }
UINT32 extends PtpInteger { public static UINT32 read(InputStream is) throws IOException { byte[] bytes = new byte[SIZE_IN_BYTES]; if (is.read(bytes) != SIZE_IN_BYTES) { throw new EOFException(); } return new UINT32(bytes); } }
UINT32 extends PtpInteger { public static UINT32 read(InputStream is) throws IOException { byte[] bytes = new byte[SIZE_IN_BYTES]; if (is.read(bytes) != SIZE_IN_BYTES) { throw new EOFException(); } return new UINT32(bytes); } UINT32(long value);  UINT32(BigInteger value);  UINT32(byte[] bytes); }
UINT32 extends PtpInteger { public static UINT32 read(InputStream is) throws IOException { byte[] bytes = new byte[SIZE_IN_BYTES]; if (is.read(bytes) != SIZE_IN_BYTES) { throw new EOFException(); } return new UINT32(bytes); } UINT32(long value);  UINT32(BigInteger value);  UINT32(byte[] bytes); static UINT32 read(InputStream is); }
UINT32 extends PtpInteger { public static UINT32 read(InputStream is) throws IOException { byte[] bytes = new byte[SIZE_IN_BYTES]; if (is.read(bytes) != SIZE_IN_BYTES) { throw new EOFException(); } return new UINT32(bytes); } UINT32(long value);  UINT32(BigInteger value);  UINT32(byte[] bytes); static UINT32 read(InputStream is); static final int SIZE_IN_BYTES; static final UINT32 MIN_VALUE; static final UINT32 MAX_VALUE; static final UINT32 ZERO; }