public abstract class AbstractSeekableStreamHandle<L extends Location> extends AbstractStreamHandle<L> implements SeekableStreamHandle<L>
DataHandle.ByteOrderDEFAULT_BLOCK_SIZE, MAX_SEARCH_SIZE| Constructor and Description |
|---|
AbstractSeekableStreamHandle() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
recreatePossible()
In some implementations of this class, the ability to recreate the stream
depends on external factors (e.g.
|
protected abstract void |
recreateStreamFromPos(long pos)
Recreates the internal input stream available through
StreamHandle.in(), so
that it starts from the specified position. |
void |
seek(long pos)
Sets the stream offset, measured from the beginning of the stream, at which
the next read or write occurs.
|
protected void |
setJumpCutoff(long jumpCutoff)
Sets the maximum of bytes which are read from the stream when seeking
forward.
|
offset, setOffsetconversionBuffer, getEncoding, getOrder, setEncoding, setOrderget, setsupportsgetInfo, getPriority, setInfo, setPriority, toStringcontext, getContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitresetStreamadvance, close, ensureReadable, ensureWritable, in, jump, out, read, read, readByte, setOffset, write, write, writeByteavailable, checksum, conversionBuffer, exists, findString, findString, findString, findString, getEncoding, getOrder, isBigEndian, isLittleEndian, isReadable, isWritable, lastModified, length, offset, read, readBoolean, readChar, readCString, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readString, readString, readUnsignedByte, readUnsignedShort, readUTF, setEncoding, setLength, setLittleEndian, setOrder, skip, skipBytes, write, writeBoolean, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLine, writeLong, writeShort, writeUTFget, setgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersionpublic void seek(long pos)
throws IOException
DataHandleseek in interface DataHandle<L extends Location>seek in interface ResettableStreamHandle<L extends Location>seek in interface SeekableStreamHandle<L extends Location>seek in interface StreamHandle<L extends Location>IOExceptionprotected abstract void recreateStreamFromPos(long pos)
throws IOException
StreamHandle.in(), so
that it starts from the specified position.pos - IOExceptionprotected abstract boolean recreatePossible()
throws IOException
IOExceptionprotected void setJumpCutoff(long jumpCutoff)
recreateStreamFromPos(long).Copyright © 2015–2022 SciJava. All rights reserved.