| Constructor and Description |
|---|
DataInputByteArray(byte[] buffer)
Constructor.
|
| 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.
|
int |
readUnsignedByte()
Read one single unsigned byte from the buffer.
|
void |
setPosition(int position)
Sets the current position to the given value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadInt, readOffset, readShort, readUnsignedShortpublic DataInputByteArray(byte[] buffer)
buffer - the buffer to be readpublic boolean hasRemaining()
throws IOException
hasRemaining in interface DataInputIOException - if an error occurs during readingpublic int getPosition()
getPosition in interface DataInputpublic void setPosition(int position)
throws IOException
setPosition in interface DataInputposition - the given positionIOException - if the new position ist out of rangepublic byte readByte()
throws IOException
readByte in interface DataInputIOException - if an error occurs during readingpublic int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOException - if an error occurs during readingpublic int peekUnsignedByte(int offset)
throws IOException
peekUnsignedByte in interface DataInputoffset - offset to the byte to be peekedIOException - if an error occurs during readingpublic byte[] readBytes(int length)
throws IOException
readBytes in interface DataInputlength - the number of bytes to be readIOException - if an error occurs during readingpublic int length()
throws IOException
length in interface DataInputIOExceptionCopyright © 2008–2025 The Apache Software Foundation. All rights reserved.