public interface RandomAccessInput extends DataInput, Closeable
| Modifier and Type | Method and Description |
|---|---|
long |
available() |
int |
compare(long offset,
long length,
RandomAccessInput other,
long otherOffset,
long otherLength)
Compare two inputs in the specified range.
|
RandomAccessInput |
duplicate()
Creates a new input that shares content like buffer or file,
but use independent position
|
long |
position() |
default byte[] |
readBytes(int size) |
default int |
readFixedInt() |
void |
seek(long position)
Set current position to specified position, measured from the beginning
of input.
|
long |
skip(long n)
Skip
n bytes. |
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipByteslong position()
void seek(long position) throws IOException
IOException - If can't seek to specified position.long skip(long n) throws IOException
n bytes.DataInput.skipBytes(int) and InputStream.skip(long), which
return the number of bytes actually skipped.IOExceptionlong available()
throws IOException
IOExceptionRandomAccessInput duplicate() throws IOException
IOExceptionint compare(long offset,
long length,
RandomAccessInput other,
long otherOffset,
long otherLength)
throws IOException
IOExceptiondefault byte[] readBytes(int size)
throws IOException
IOExceptiondefault int readFixedInt()
throws IOException
IOExceptionCopyright © 2020–2021. All rights reserved.