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