public interface DataInput
| Modifier and Type | Method and Description |
|---|---|
int |
getPosition()
Returns the current position.
|
boolean |
hasRemaining()
Determines if there are any bytes left to read or not.
|
int |
length() |
int |
peekUnsignedByte(int offset)
Peeks one single unsigned byte from the buffer.
|
byte |
readByte()
Read one single byte from the buffer.
|
byte[] |
readBytes(int length)
Read a number of single byte values from the buffer.
|
default int |
readInt()
Read one single int (4 bytes) from the buffer.
|
default int |
readOffset(int offSize)
Read the offset from the buffer.
|
default short |
readShort()
Read one single short value from the buffer.
|
int |
readUnsignedByte()
Read one single unsigned byte from the buffer.
|
default int |
readUnsignedShort()
Read one single unsigned short (2 bytes) value from the buffer.
|
void |
setPosition(int position)
Sets the current position to the given value.
|
boolean hasRemaining()
throws IOException
IOException - if an error occurs during readingint getPosition()
throws IOException
IOException - if an error occurs during readingvoid setPosition(int position)
throws IOException
position - the given positionIOException - if the new position ist out of rangebyte readByte()
throws IOException
IOException - if an error occurs during readingint readUnsignedByte()
throws IOException
IOException - if an error occurs during readingint peekUnsignedByte(int offset)
throws IOException
offset - offset to the byte to be peekedIOException - if an error occurs during readingdefault short readShort()
throws IOException
IOException - if an error occurs during readingdefault int readUnsignedShort()
throws IOException
IOException - if an error occurs during readingdefault int readInt()
throws IOException
IOException - if an error occurs during readingbyte[] readBytes(int length)
throws IOException
length - the number of bytes to be readIOException - if an error occurs during readingint length()
throws IOException
IOExceptiondefault int readOffset(int offSize)
throws IOException
offSize - the given offsizeIOException - if an error occurs during readingCopyright © 2008–2025 The Apache Software Foundation. All rights reserved.