public class HDF5BooleanReader extends java.lang.Object implements IHDF5BooleanReader
IHDF5BooleanReader
.Modifier and Type | Method and Description |
---|---|
boolean |
getAttr(java.lang.String objectPath,
java.lang.String attributeName)
Reads a
boolean attribute named attributeName from the data set
objectPath. |
boolean |
isBitSet(java.lang.String objectPath,
int bitIndex)
Returns
true if the bitIndex of the bit field dataset
objectPath is set, false otherwise. |
boolean |
read(java.lang.String objectPath)
Reads a
Boolean value from the data set objectPath. |
java.util.BitSet |
readBitField(java.lang.String objectPath)
Reads a bit field (which can be considered the equivalent to a boolean array of rank 1) from
the data set objectPath and returns it as a Java
BitSet . |
java.util.BitSet[] |
readBitFieldArray(java.lang.String objectPath)
Reads a bit field array (which can be considered the equivalent to a boolean array of rank 2)
from the data set objectPath and returns it as a Java
BitSet . |
java.util.BitSet[] |
readBitFieldArrayBlock(java.lang.String objectPath,
int blockSize,
long blockNumber)
Reads a block of a bit field array (which can be considered the equivalent to a boolean array
of rank 2) from the data set objectPath and returns it as a Java
BitSet . |
java.util.BitSet[] |
readBitFieldArrayBlockWithOffset(java.lang.String objectPath,
int blockSize,
long offset)
Reads a block of a bit field array (which can be considered the equivalent to a boolean array
of rank 2) from the data set objectPath and returns it as a Java
BitSet . |
java.util.BitSet |
readBitFieldBlock(java.lang.String objectPath,
int blockSize,
long blockNumber)
Reads a block of a bit field (which can be considered the equivalent to a boolean array of
rank 1) from the data set objectPath and returns it as a Java
BitSet . |
java.util.BitSet |
readBitFieldBlockWithOffset(java.lang.String objectPath,
int blockSize,
long offset)
Reads a block of a bit field (which can be considered the equivalent to a boolean array of
rank 1) from the data set objectPath and returns it as a Java
BitSet . |
public boolean getAttr(java.lang.String objectPath, java.lang.String attributeName) throws HDF5JavaException
IHDF5BooleanReader
boolean
attribute named attributeName from the data set
objectPath.getAttr
in interface IHDF5BooleanReader
objectPath
- The name (including path information) of the data set object in the file.attributeName
- The name of the attribute to read.HDF5JavaException
- If the attribute is not a boolean type.public boolean read(java.lang.String objectPath) throws HDF5JavaException
IHDF5BooleanReader
Boolean
value from the data set objectPath.read
in interface IHDF5BooleanReader
objectPath
- The name (including path information) of the data set object in the file.HDF5JavaException
- If the objectPath is not a boolean type.public java.util.BitSet readBitField(java.lang.String objectPath) throws HDF5DatatypeInterfaceException
IHDF5BooleanReader
BitSet
.
Note that the storage form of the bit array is a long[]
. However, it is marked
in HDF5 to be interpreted bit-wise. Thus a data set written by
IHDF5LongWriter.writeArray(String, long[])
cannot be read back by this method but
will throw a HDF5DatatypeInterfaceException
.
readBitField
in interface IHDF5BooleanReader
objectPath
- The name (including path information) of the data set object in the file.BitSet
read from the data set.HDF5DatatypeInterfaceException
- If the objectPath is not of bit field type.public java.util.BitSet readBitFieldBlock(java.lang.String objectPath, int blockSize, long blockNumber)
IHDF5BooleanReader
BitSet
.
Note that the storage form of the bit array is a long[]
. However, it is marked
in HDF5 to be interpreted bit-wise. Thus a data set written by
IHDF5LongWriter.writeArray(String, long[])
cannot be read back by this method but
will throw a HDF5DatatypeInterfaceException
.
readBitFieldBlock
in interface IHDF5BooleanReader
objectPath
- The name (including path information) of the data set object in the file.blockSize
- The size of the block (in 64 bit words) to read.blockNumber
- The number of the block to read.BitSet
read from the data set.public java.util.BitSet readBitFieldBlockWithOffset(java.lang.String objectPath, int blockSize, long offset)
IHDF5BooleanReader
BitSet
.
Note that the storage form of the bit array is a long[]
. However, it is marked
in HDF5 to be interpreted bit-wise. Thus a data set written by
IHDF5LongWriter.writeArray(String, long[])
cannot be read back by this method but
will throw a HDF5DatatypeInterfaceException
.
readBitFieldBlockWithOffset
in interface IHDF5BooleanReader
objectPath
- The name (including path information) of the data set object in the file.blockSize
- The size of the block (in 64 bit words) to read.offset
- The offset of the block (in 64 bit words) to start reading from.BitSet
read from the data set.public boolean isBitSet(java.lang.String objectPath, int bitIndex)
IHDF5BooleanReader
true
if the bitIndex of the bit field dataset
objectPath is set, false
otherwise.
Will also return false
, if bitIndex is outside of the bitfield
dataset.
isBitSet
in interface IHDF5BooleanReader
public java.util.BitSet[] readBitFieldArray(java.lang.String objectPath)
IHDF5BooleanReader
BitSet
.
Note that the storage form of the bit array is a long[]
. However, it is marked
in HDF5 to be interpreted bit-wise. Thus a data set written by
IHDF5LongWriter.writeMatrix(String, long[][])
cannot be read back by this method but
will throw a HDF5DatatypeInterfaceException
.
readBitFieldArray
in interface IHDF5BooleanReader
objectPath
- The name (including path information) of the data set object in the file.BitSet
array read from the data set.public java.util.BitSet[] readBitFieldArrayBlockWithOffset(java.lang.String objectPath, int blockSize, long offset)
IHDF5BooleanReader
BitSet
.
Note that the storage form of the bit array is a long[]
. However, it is marked
in HDF5 to be interpreted bit-wise. Thus a data set written by
IHDF5LongWriter.writeMatrix(String, long[][])
cannot be read back by this method but
will throw a HDF5DatatypeInterfaceException
.
readBitFieldArrayBlockWithOffset
in interface IHDF5BooleanReader
objectPath
- The name (including path information) of the data set object in the file.blockSize
- The size of the array block.offset
- The offset in the array where to start reading the block.BitSet
array read from the data set.public java.util.BitSet[] readBitFieldArrayBlock(java.lang.String objectPath, int blockSize, long blockNumber)
IHDF5BooleanReader
BitSet
.
Note that the storage form of the bit array is a long[]
. However, it is marked
in HDF5 to be interpreted bit-wise. Thus a data set written by
IHDF5LongWriter.writeMatrix(String, long[][])
cannot be read back by this method but
will throw a HDF5DatatypeInterfaceException
.
readBitFieldArrayBlock
in interface IHDF5BooleanReader
objectPath
- The name (including path information) of the data set object in the file.blockSize
- The size of the array block.blockNumber
- The number of the array block (offset is blockNumber * blockSize
.).BitSet
array read from the data set.