
io.jhdf.CommittedDatatype Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jhdf Show documentation
Show all versions of jhdf Show documentation
A pure Java HDF5 library
/*
* This file is part of jHDF. A pure Java library for accessing HDF5 files.
*
* https://jhdf.io
*
* Copyright (c) 2025 James Mudd
*
* MIT License see 'LICENSE' file
*/
package io.jhdf;
import io.jhdf.api.Group;
import io.jhdf.api.NodeType;
import io.jhdf.exceptions.HdfException;
import io.jhdf.object.datatype.DataType;
import io.jhdf.object.message.DataTypeMessage;
import io.jhdf.storage.HdfBackingStorage;
import org.apache.commons.lang3.concurrent.ConcurrentException;
public class CommittedDatatype extends AbstractNode {
public CommittedDatatype(HdfBackingStorage hdfBackingStorage, long address, String name, Group parent) {
super(hdfBackingStorage, address, name, parent);
}
@Override
public NodeType getType() {
return NodeType.COMMITTED_DATATYPE;
}
public DataType getDataType() {
try {
return header.get().getMessageOfType(DataTypeMessage.class).getDataType();
} catch (ConcurrentException e) {
throw new HdfException("Failed to get data type from committed datatype [" + getPath() + "]");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy