public abstract class ChunkedDatasetBase extends DatasetBase implements ChunkedDataset
Modifier and Type | Class and Description |
---|---|
protected class |
ChunkedDatasetBase.FilterPipelineLazyInitializer |
AbstractNode.AttributesLazyInitializer
Modifier and Type | Field and Description |
---|---|
protected ChunkedDatasetBase.FilterPipelineLazyInitializer |
lazyPipeline |
hdfBackingStorage, oh
address, attributes, header, name, parent
Constructor and Description |
---|
ChunkedDatasetBase(HdfBackingStorage hdfBackingStorage,
long address,
java.lang.String name,
Group parent,
ObjectHeader oh) |
Modifier and Type | Method and Description |
---|---|
protected void |
fillDataFromChunk(Chunk chunk,
byte[] dataArray,
int[] chunkDimensions,
int[] chunkInternalOffsets,
int[] dataOffsets,
int fastestChunkDim,
int elementSize) |
protected int[] |
getChunkInternalOffsets(int[] chunkDimensions,
int elementSize)
Gets the offsets inside a chunk where a contiguous run of data starts.
|
protected abstract java.util.Map<ChunkOffset,Chunk> |
getChunkLookup() |
java.nio.ByteBuffer |
getDataBuffer()
Gets the buffer that holds this datasets data.
|
protected int[] |
getDataOffsets(int[] chunkInternalOffsets)
Calculates the linear offsets into the dataset for each of the chunks internal offsets.
|
java.util.List<PipelineFilterWithData> |
getFilters()
Gets the filters applied to this dataset with the corresponding filter data.
|
java.nio.ByteBuffer |
getRawChunkBuffer(int[] chunkOffset)
Gets the raw buffer for the specified chunk.
|
java.nio.ByteBuffer |
getSliceDataBuffer(long[] offset,
int[] shape) |
long |
getStorageInBytes()
Gets the size of the storage used for this dataset in bytes.
|
boolean |
isEmpty()
Checks if this dataset is empty i.e holds no data and no storage is
allocated.
|
convertToCorrectEndiness, getData, getData, getDataFlat, getDataLayout, getDataType, getDimensions, getFillValue, getJavaType, getMaxSize, getSize, getSizeInBytes, getType, isCompound, isScalar, isVariableLength, toString
getAddress, getAttribute, getAttributes, getFile, getFileAsPath, getHdfFile, getHeader, getHeaderMessage, getName, getParent, getPath, isAttributeCreationOrderTracked, isGroup, isLink
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChunkDimensions
getData, getData, getDataFlat, getDataLayout, getDataType, getDimensions, getFillValue, getJavaType, getMaxSize, getSize, getSizeInBytes, isCompound, isScalar, isVariableLength
getAddress, getAttribute, getAttributes, getFile, getFileAsPath, getHdfFile, getName, getParent, getPath, getType, isAttributeCreationOrderTracked, isGroup, isLink
protected final ChunkedDatasetBase.FilterPipelineLazyInitializer lazyPipeline
public ChunkedDatasetBase(HdfBackingStorage hdfBackingStorage, long address, java.lang.String name, Group parent, ObjectHeader oh)
protected void fillDataFromChunk(Chunk chunk, byte[] dataArray, int[] chunkDimensions, int[] chunkInternalOffsets, int[] dataOffsets, int fastestChunkDim, int elementSize)
protected int[] getDataOffsets(int[] chunkInternalOffsets)
chunkInternalOffsets
- a chunk offsetpublic java.nio.ByteBuffer getDataBuffer()
DatasetBase
getDataBuffer
in class DatasetBase
protected int[] getChunkInternalOffsets(int[] chunkDimensions, int elementSize)
chunkDimensions
- the dimensions of each chunkelementSize
- number of bytes in a an dataset elementpublic java.nio.ByteBuffer getRawChunkBuffer(int[] chunkOffset)
ChunkedDataset
getRawChunkBuffer
in interface ChunkedDataset
chunkOffset
- the offset of the required chunkprotected abstract java.util.Map<ChunkOffset,Chunk> getChunkLookup()
public boolean isEmpty()
Dataset
isEmpty
in interface Dataset
isEmpty
in class DatasetBase
true
if dataset if empty false
otherwisepublic long getStorageInBytes()
Dataset
Dataset.getSizeInBytes()
due to the use of compression.getStorageInBytes
in interface Dataset
getStorageInBytes
in class DatasetBase
public java.nio.ByteBuffer getSliceDataBuffer(long[] offset, int[] shape)
getSliceDataBuffer
in class DatasetBase
public java.util.List<PipelineFilterWithData> getFilters()
Dataset
getFilters
in interface Dataset