public abstract class AbstractNIOHandle extends java.lang.Object implements IRandomAccess
IRandomAccess
,
RandomAccessFile
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
EOF_ERROR_MSG
Error message to be used when instantiating an EOFException.
|
Constructor and Description |
---|
AbstractNIOHandle() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
setLength(long length)
Sets the new length of the handle.
|
protected boolean |
validateLength(int writeLength)
Ensures that the handle has the correct length to be written to and
extends it as required.
|
protected void |
validateMode(java.lang.String mode)
Ensures that the file mode is either "r" or "rw".
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getFilePointer, getOrder, length, read, read, read, read, seek, setOrder, write, write
protected static final java.lang.String EOF_ERROR_MSG
protected void validateMode(java.lang.String mode)
mode
- Mode to validate.java.lang.IllegalArgumentException
- If an illegal mode is passed.protected boolean validateLength(int writeLength) throws java.io.IOException
writeLength
- Number of bytes to write.true
if the buffer has not required an extension.
false
otherwise.java.io.IOException
- If there is an error changing the handle's length.protected abstract void setLength(long length) throws java.io.IOException
length
- New length.java.io.IOException
- If there is an error changing the handle's length.Copyright © 2014 Open Microscopy Environment