public class DummyHandle extends AbstractDataHandle<DummyLocation>
DataHandle which reads all zeroes, and writes no actual data.DataHandle.ByteOrderDEFAULT_BLOCK_SIZE, MAX_SEARCH_SIZE| Constructor and Description |
|---|
DummyHandle() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
exists()
Tests whether this handle's location actually exists at the source.
|
Class<DummyLocation> |
getType()
Gets the type associated with the object.
|
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.
|
long |
offset()
Returns the current offset in the stream.
|
int |
read(byte[] b,
int off,
int len)
Reads up to
len bytes of data from the stream into an array of
bytes. |
byte |
readByte() |
void |
seek(long pos)
Sets the stream offset, measured from the beginning of the stream, at which
the next read or write occurs.
|
void |
setLength(long length)
Sets the new length of the handle.
|
void |
write(byte[] b,
int off,
int len) |
void |
write(int v) |
conversionBuffer, getEncoding, getOrder, setEncoding, setOrderget, setsupportsgetInfo, getPriority, setInfo, setPriority, toStringcontext, getContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitavailable, checksum, ensureReadable, ensureWritable, findString, findString, findString, findString, isBigEndian, isLittleEndian, lastModified, read, read, readBoolean, readChar, readCString, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readString, readString, readUnsignedByte, readUnsignedShort, readUTF, setLittleEndian, skip, skipBytes, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLine, writeLong, writeShort, writeUTFget, setgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersionpublic boolean isReadable()
DataHandlepublic boolean isWritable()
DataHandlepublic boolean exists()
DataHandlepublic long offset()
DataHandlepublic void seek(long pos)
DataHandlepublic long length()
DataHandlepublic void setLength(long length)
DataHandlelength - New length.public byte readByte()
throws IOException
IOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
DataHandlelen bytes of data from the stream into an array of
bytes.IOExceptionpublic void write(int v)
throws IOException
IOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic void close()
public Class<DummyLocation> getType()
TypedCopyright © 2015–2022 SciJava. All rights reserved.