public abstract class DiskDataStorage extends DataStorage
DataStorage.AbstractIterator, DataStorage.IteratorREAD, READ_WRITE, WRITE| Modifier | Constructor and Description |
|---|---|
protected |
DiskDataStorage()
Default constructor.
|
protected |
DiskDataStorage(DiskDataStorage diskDataStorage,
long offset,
long length)
Subsequence constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected static int |
getBlockSize()
Convenience method for getting the block size (in bytes) for the
current
ApfloatContext. |
protected FileChannel |
getFileChannel()
The
FileChannel of the underlying disk file. |
protected String |
getFilename()
Filename of the underlying disk data storage.
|
protected abstract int |
getUnitSize()
Size of the element type, in bytes.
|
protected void |
implCopyFrom(DataStorage dataStorage,
long size)
Copies the specified number of elements from another data storage to this data storage.
|
protected long |
implGetSize()
Return the size of the whole data storage, not including sub-sequence settings.
|
protected void |
implSetSize(long size)
Sets the size of the data storage.
|
protected void |
transferFrom(ReadableByteChannel in,
long position,
long size)
Transfer from a readable channel, possibly in multiple chunks.
|
protected void |
transferTo(WritableByteChannel out,
long position,
long size)
Transfer to a writable channel, possibly in multiple chunks.
|
copyFrom, copyFrom, getArray, getOffset, getSize, getTransposedArray, implGetArray, implGetTransposedArray, implSubsequence, isReadOnly, isSubsequenced, iterator, setReadOnly, setSize, subsequenceprotected DiskDataStorage()
throws ApfloatRuntimeException
ApfloatRuntimeExceptionprotected DiskDataStorage(DiskDataStorage diskDataStorage, long offset, long length)
diskDataStorage - The originating data storage.offset - The subsequence starting position.length - The subsequence length.protected void implCopyFrom(DataStorage dataStorage, long size) throws ApfloatRuntimeException
DataStorageimplCopyFrom in class DataStoragedataStorage - The data storage where the data should be copied from.size - The number of elements to be copied.ApfloatRuntimeExceptionprotected long implGetSize()
throws ApfloatRuntimeException
DataStorageimplGetSize in class DataStorageApfloatRuntimeExceptionprotected void implSetSize(long size)
throws ApfloatRuntimeException
DataStorageimplSetSize in class DataStoragesize - The size of the data storage.ApfloatRuntimeExceptionprotected void transferFrom(ReadableByteChannel in, long position, long size) throws ApfloatRuntimeException
in - Input channel.position - Start position of transfer.size - Total number of bytes to transfer.ApfloatRuntimeExceptionprotected void transferTo(WritableByteChannel out, long position, long size) throws ApfloatRuntimeException
out - Output channel.position - Start position of transfer.size - Total number of bytes to transfer.ApfloatRuntimeExceptionprotected static int getBlockSize()
ApfloatContext.protected abstract int getUnitSize()
protected final String getFilename()
protected final FileChannel getFileChannel()
FileChannel of the underlying disk file.FileChannel of the underlying disk file.