Package ucar.nc2.internal.iosp.hdf5
Class H5headerNew
- java.lang.Object
-
- ucar.nc2.internal.iosp.hdf5.H5headerNew
-
- All Implemented Interfaces:
HdfHeaderIF
,H5headerIF
public class H5headerNew extends Object implements H5headerIF, HdfHeaderIF
Read all of the metadata of an HD5 file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
H5headerNew.TypeInfo
class
H5headerNew.Vinfo
-
Field Summary
Fields Modifier and Type Field Description static String
HDF5_CLASS
static String
HDF5_DIMENSION_LABELS
static String
HDF5_DIMENSION_LIST
static String
HDF5_DIMENSION_NAME
static String
HDF5_DIMENSION_SCALE
static String
HDF5_REFERENCE_LIST
-
Method Summary
-
-
-
Field Detail
-
HDF5_CLASS
public static final String HDF5_CLASS
- See Also:
- Constant Field Values
-
HDF5_DIMENSION_LIST
public static final String HDF5_DIMENSION_LIST
- See Also:
- Constant Field Values
-
HDF5_DIMENSION_SCALE
public static final String HDF5_DIMENSION_SCALE
- See Also:
- Constant Field Values
-
HDF5_DIMENSION_LABELS
public static final String HDF5_DIMENSION_LABELS
- See Also:
- Constant Field Values
-
HDF5_DIMENSION_NAME
public static final String HDF5_DIMENSION_NAME
- See Also:
- Constant Field Values
-
HDF5_REFERENCE_LIST
public static final String HDF5_REFERENCE_LIST
- See Also:
- Constant Field Values
-
-
Method Detail
-
setWarnings
public static void setWarnings(boolean warn)
-
setDebugFlags
public static void setDebugFlags(DebugFlags debugFlag)
-
isValidFile
public static boolean isValidFile(RandomAccessFile raf) throws IOException
- Throws:
IOException
-
getValueCharset
protected Charset getValueCharset()
Return definedvalue charset
that will be used by reading HDF5 header.- Returns:
charset
-
read
public void read(PrintWriter debugPS) throws IOException
- Throws:
IOException
-
convertEnums
protected Array convertEnums(Map<Integer,String> map, DataType dataType, Array values)
-
getRootGroup
public Group.Builder getRootGroup()
- Specified by:
getRootGroup
in interfaceHdfHeaderIF
-
makeVinfoForDimensionMapVariable
public void makeVinfoForDimensionMapVariable(Group.Builder parent, Variable.Builder<?> v)
- Specified by:
makeVinfoForDimensionMapVariable
in interfaceHdfHeaderIF
-
readStructMetadata
public String readStructMetadata(Variable.Builder<?> structMetadataVar) throws IOException
- Specified by:
readStructMetadata
in interfaceHdfHeaderIF
- Throws:
IOException
-
makeIntFromBytes
public int makeIntFromBytes(byte[] bb, int start, int n)
- Specified by:
makeIntFromBytes
in interfaceH5headerIF
-
isOffsetLong
public boolean isOffsetLong()
- Specified by:
isOffsetLong
in interfaceH5headerIF
-
readLength
public long readLength() throws IOException
- Specified by:
readLength
in interfaceH5headerIF
- Throws:
IOException
-
readOffset
public long readOffset() throws IOException
- Specified by:
readOffset
in interfaceH5headerIF
- Throws:
IOException
-
readAddress
public long readAddress() throws IOException
- Specified by:
readAddress
in interfaceH5headerIF
- Throws:
IOException
-
getSizeLengths
public byte getSizeLengths()
- Specified by:
getSizeLengths
in interfaceH5headerIF
-
getNumBytesFromMax
public int getNumBytesFromMax(long maxNumber)
- Specified by:
getNumBytesFromMax
in interfaceH5headerIF
-
readVariableSizeUnsigned
public long readVariableSizeUnsigned(int size) throws IOException
- Specified by:
readVariableSizeUnsigned
in interfaceH5headerIF
- Throws:
IOException
-
getRandomAccessFile
public RandomAccessFile getRandomAccessFile()
- Specified by:
getRandomAccessFile
in interfaceH5headerIF
-
getFileOffset
public long getFileOffset(long address)
- Specified by:
getFileOffset
in interfaceH5headerIF
-
getSizeOffsets
public byte getSizeOffsets()
- Specified by:
getSizeOffsets
in interfaceH5headerIF
-
close
public void close()
-
getEosInfo
public void getEosInfo(Formatter f) throws IOException
- Throws:
IOException
-
getDataObjects
public List<H5objects.DataObject> getDataObjects()
-
-