public abstract class AbstractHigherOrderHandle<L extends Location> extends AbstractDataHandle<L>
DataHandle
s that operate over other
DataHandle
s.DataHandle.ByteOrder
DEFAULT_BLOCK_SIZE, MAX_SEARCH_SIZE
Constructor and Description |
---|
AbstractHigherOrderHandle(DataHandle<L> handle) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
cleanup()
Clean up data structures after a handle has been closed in the
close() method. |
void |
close() |
protected void |
ensureOpen() |
boolean |
exists()
Tests whether this handle's location actually exists at the source.
|
Class<L> |
getType()
Gets the type associated with the object.
|
protected DataHandle<L> |
handle() |
boolean |
isReadable()
Gets whether reading from this handle is supported.
|
boolean |
isWritable()
Gets whether writing to this handle is supported.
|
long |
length()
Returns the length of the data in bytes.
|
conversionBuffer, getEncoding, getOrder, setEncoding, setOrder
get, set
supports
getInfo, getPriority, setInfo, setPriority, toString
context, getContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
available, checksum, ensureReadable, ensureWritable, findString, findString, findString, findString, isBigEndian, isLittleEndian, lastModified, offset, read, read, read, readBoolean, readChar, readCString, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readString, readString, readUnsignedByte, readUnsignedShort, readUTF, seek, setLength, setLittleEndian, skip, skipBytes, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLine, writeLong, writeShort, writeUTF
get, set
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
write, write
public AbstractHigherOrderHandle(DataHandle<L> handle)
public boolean isReadable()
DataHandle
public boolean isWritable()
DataHandle
public long length() throws IOException
DataHandle
IOException
public Class<L> getType()
Typed
public boolean exists() throws IOException
DataHandle
IOException
- If something goes wrong with the existence check.public void close() throws IOException
IOException
protected void ensureOpen() throws IOException
IOException
protected abstract void cleanup() throws IOException
close()
method.IOException
protected DataHandle<L> handle()
DataHandle
wrapped by this
AbstractHigherOrderHandle
Copyright © 2015–2022 SciJava. All rights reserved.