/** * Delegates to {@link EndianUtils#readSwappedUnsignedShort(InputStream)}. * @return the read long * @throws EOFException if an end of file is reached unexpectedly * @throws IOException if an I/O error occurs */ @Override public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); }
/** @see java.io.DataInput#readUnsignedShort() */ public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); }
@Test public void testReadSwappedUnsignedShort() throws IOException { final byte[] bytes = new byte[] { 0x02, 0x01 }; assertEquals( 0x00000102, EndianUtils.readSwappedUnsignedShort( bytes, 0 ) ); final ByteArrayInputStream input = new ByteArrayInputStream(bytes); assertEquals( 0x00000102, EndianUtils.readSwappedUnsignedShort( input ) ); }
recordLength = EndianUtils.readSwappedUnsignedShort(recordLengthBytes, 0); pos += lengthExpected;
/** * Delegates to {@link EndianUtils#readSwappedUnsignedShort(InputStream)}. * @return the read long * @throws EOFException if an end of file is reached unexpectedly * @throws IOException if an I/O error occurs */ public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); }
/** * Delegates to {@link EndianUtils#readSwappedUnsignedShort(InputStream)}. * @return the read long * @throws EOFException if an end of file is reached unexpectedly * @throws IOException if an I/O error occurs */ public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); }
/** * Delegates to {@link EndianUtils#readSwappedUnsignedShort(InputStream)}. * @return the read long * @throws EOFException if an end of file is reached unexpectedly * @throws IOException if an I/O error occurs */ @Override public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); }
/** * Delegates to {@link EndianUtils#readSwappedUnsignedShort(InputStream)}. * @return the read long * @throws EOFException if an end of file is reached unexpectedly * @throws IOException if an I/O error occurs */ public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); }
/** * Delegates to {@link EndianUtils#readSwappedUnsignedShort(InputStream)}. * @return the read long * @throws EOFException if an end of file is reached unexpectedly * @throws IOException if an I/O error occurs */ public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); }
/** * Delegates to {@link EndianUtils#readSwappedUnsignedShort(InputStream)}. * @return the read long * @throws EOFException if an end of file is reached unexpectedly * @throws IOException if an I/O error occurs */ public int readUnsignedShort() throws IOException, EOFException { return EndianUtils.readSwappedUnsignedShort( in ); }
public int readUnsignedShort() throws IOException { return EndianUtils.readSwappedUnsignedShort(this); }
public static int readUnsignedShort(DataInput dataInput) throws IOException { byte b[] = new byte[2]; dataInput.readFully(b); return EndianUtils.readSwappedUnsignedShort(b, 0); }