public abstract class SeekableDataInputStream extends DataInputStream
InputStream that supports random access by allowing to seek to
an arbitrary position within the stream and read the content.in| Constructor and Description |
|---|
SeekableDataInputStream(InputStream in)
Creates a DataInputStream that uses the specified
underlying InputStream.
|
| Modifier and Type | Method and Description |
|---|---|
abstract long |
getPos() |
abstract void |
seek(long pos)
Seeks to a position within the stream.
|
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytesavailable, close, mark, markSupported, read, reset, skippublic SeekableDataInputStream(InputStream in)
in - the specified input streampublic abstract long getPos()
throws IOException
IOExceptionpublic abstract void seek(long pos)
throws IOException
pos - target position to seek to.IOException - upon error.Copyright © 2025 The Apache Software Foundation. All rights reserved.