public interface IHDF5Writer extends IHDF5Reader, IHDF5SimpleWriter
Obtain an object implementing this interface by calling HDF5Factory.open(String)
or
IHDF5WriterConfigurator.writer()
.
The interface focuses on ease of use instead of completeness. As a consequence not all features of HDF5 are supported by this class, however it covers a large subset.
The functionality is being made available in two ways:
IHDF5SimpleWriter
contains the most important methods in one interface. If you are
new to the library, this is a good starting point, see the example code below.file()
: File-level information and operations, has e.g. the
IHDF5FileLevelReadOnlyHandler.close()
and IHDF5FileLevelReadWriteHandler.flush()
methods.object()
: Object-level information, where "objects" can be data sets, links, groups
or data types, following the concept of an HDF5 object. Here you can find methods like
IHDF5ObjectReadWriteInfoProviderHandler.createGroup(String)
for creating a new group, or
IHDF5ObjectReadWriteInfoProviderHandler.createSoftLink(String, String)
for creating a
symbolic link.bool()
: Writer methods for boolean data sets, including bit fields.int8()
/ int16()
/ int16()
/ int32()
/ int64()
:
Writer methods for signed integer data sets, where the number as part of the method name denotes
the size of the integer type.uint8()
/ uint16()
/ uint16()
/ uint32()
/
int64()
: Writer methods for unsigned integer data sets, where the number as part of the
name sets the size of the integer type. While the data sets take signed integer values due to
Java's lack of unsigned integer types, they represent them as unsigned values in the HDF5
file. See UnsignedIntUtils
for conversion methods, e.g.
uint32().write("myint", UnsignedIntUtils.toInt16(50000))
will write a 16-bit
unsigned integer with value 50000.float32()
/ float64()
: Writer methods for float data sets, where the number
as part of the name sets the size of the float type.time()
/ duration()
: Writer methods for time stamp (or date) and for time
duration data sets.string()
: Writer methods for string data sets.enumeration()
: Writer methods for enumeration data sets.compound()
: Writer methods for compound data sets.opaque()
: Writer methods for data sets that are "black boxes" to HDF5 which are
called "opaque data sets" in HDF5 jargon. Here you can also find methods of reading arbitrary
data sets as byte arrays.reference()
: Writer methods for HDF5 object references. Note that object references,
though similar to hard links and symbolic links on the first glance, are quite different for
HDF5.Simple usage example:
float[] f = new float[100]; ... IHDF5Writer writer = HDF5FactoryProvider.get().open(new File("test.h5")); writer.writeFloatArray("/some/path/dataset", f); writer.setStringAttribute("some key", "some value"); writer.close();
Modifier and Type | Method and Description |
---|---|
IHDF5BooleanWriter |
bool()
Returns the full writer for boolean values.
|
IHDF5CompoundWriter |
compound()
Returns the full reader for compounds.
|
IHDF5TimeDurationWriter |
duration()
Returns the full writer for time durations.
|
IHDF5EnumWriter |
enumeration()
Returns the full writer for enumerations.
|
IHDF5FileLevelReadWriteHandler |
file()
Returns the handler for file-level information and status.
|
IHDF5FloatWriter |
float32()
Returns the full writer for float / float32.
|
IHDF5DoubleWriter |
float64()
Returns the full writer for long / float64.
|
IHDF5ShortWriter |
int16()
Returns the full writer for short / int16.
|
IHDF5IntWriter |
int32()
Returns the full writer for int / int32.
|
IHDF5LongWriter |
int64()
Returns the full writer for long / int64.
|
IHDF5ByteWriter |
int8()
Returns the full writer for byte / int8.
|
IHDF5ObjectReadWriteInfoProviderHandler |
object()
Returns an info provider and handler for HDF5 objects like links, groups, data sets and data
types.
|
IHDF5OpaqueWriter |
opaque()
Returns the full writer for opaque values.
|
IHDF5ReferenceWriter |
reference()
Returns the full reader for object references.
|
IHDF5StringWriter |
string()
Returns the full writer for strings.
|
IHDF5DateTimeWriter |
time()
Returns the full writer for date and times.
|
IHDF5ShortWriter |
uint16()
Returns the full writer for unsigned short / uint16.
|
IHDF5IntWriter |
uint32()
Returns the full writer for unsigned int / uint32.
|
IHDF5LongWriter |
uint64()
Returns the full writer for unsigned long / uint64.
|
IHDF5ByteWriter |
uint8()
Returns the full writer for unsigned byte / uint8.
|
delete, writeBitField, writeBoolean, writeByteArray, writeCompound, writeCompoundArray, writeDate, writeDateArray, writeDouble, writeDoubleArray, writeDoubleMatrix, writeEnum, writeEnumArray, writeEnumArray, writeFloat, writeFloatArray, writeFloatMatrix, writeInt, writeIntArray, writeIntMatrix, writeLong, writeLongArray, writeLongMatrix, writeString, writeStringArray, writeTimeDuration, writeTimeDurationArray
close, exists, getDataSetInformation, getGroupMembers, isGroup, readAsByteArray, readBitField, readBoolean, readCompound, readCompoundArray, readDate, readDateArray, readDouble, readDoubleArray, readDoubleMatrix, readEnum, readEnumArray, readEnumArrayAsString, readEnumAsString, readFloat, readFloatArray, readFloatMatrix, readInt, readIntArray, readIntMatrix, readLong, readLongArray, readLongMatrix, readString, readStringArray, readTimeDuration, readTimeDurationArray
IHDF5FileLevelReadWriteHandler file()
file
in interface IHDF5Reader
IHDF5ObjectReadWriteInfoProviderHandler object()
object
in interface IHDF5Reader
IHDF5OpaqueWriter opaque()
opaque
in interface IHDF5Reader
IHDF5BooleanWriter bool()
bool
in interface IHDF5Reader
IHDF5ByteWriter int8()
int8
in interface IHDF5Reader
IHDF5ByteWriter uint8()
uint8
in interface IHDF5Reader
IHDF5ShortWriter int16()
int16
in interface IHDF5Reader
IHDF5ShortWriter uint16()
uint16
in interface IHDF5Reader
IHDF5IntWriter int32()
int32
in interface IHDF5Reader
IHDF5IntWriter uint32()
uint32
in interface IHDF5Reader
IHDF5LongWriter int64()
int64
in interface IHDF5Reader
IHDF5LongWriter uint64()
uint64
in interface IHDF5Reader
IHDF5FloatWriter float32()
float32
in interface IHDF5Reader
IHDF5DoubleWriter float64()
float64
in interface IHDF5Reader
IHDF5EnumWriter enumeration()
enumeration
in interface IHDF5Reader
IHDF5CompoundWriter compound()
compound
in interface IHDF5Reader
IHDF5StringWriter string()
string
in interface IHDF5Reader
IHDF5DateTimeWriter time()
time
in interface IHDF5Reader
IHDF5TimeDurationWriter duration()
duration
in interface IHDF5Reader
IHDF5ReferenceWriter reference()
reference
in interface IHDF5Reader