Package ucar.nc2.iosp.hdf5
Class H5header
- java.lang.Object
-
- ucar.nc2.iosp.NCheader
-
- ucar.nc2.iosp.hdf5.H5header
-
- All Implemented Interfaces:
H5headerIF
public class H5header extends NCheader implements H5headerIF
Read all of the metadata of an HD5 file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
H5header.DataObject
class
H5header.HeaderMessage
class
H5header.MessageAttribute
class
H5header.MessageDataspace
class
H5header.MessageDatatype
static class
H5header.MessageType
static class
H5header.TypeInfo
class
H5header.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
-
Fields inherited from class ucar.nc2.iosp.NCheader
CDF1HEAD, CDF2HEAD, CDF5HEAD, H4HEAD, H5HEAD, NC_FORMAT_64BIT, NC_FORMAT_64BIT_DATA, NC_FORMAT_64BIT_OFFSET, NC_FORMAT_CDF5, NC_FORMAT_CLASSIC, NC_FORMAT_HDF4, NC_FORMAT_HDF5, NC_FORMAT_NETCDF3, NC_FORMAT_NETCDF4
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected Array
convertEnums(Map<Integer,String> map, DataType dataType, Array values)
List<H5header.DataObject>
getDataObjects()
long
getFileOffset(long address)
int
getNumBytesFromMax(long maxNumber)
RandomAccessFile
getRandomAccessFile()
byte
getSizeLengths()
byte
getSizeOffsets()
boolean
isOffsetLong()
static boolean
isValidFile(RandomAccessFile raf)
int
makeIntFromBytes(byte[] bb, int start, int n)
void
read(PrintWriter debugPS)
long
readAddress()
long
readLength()
long
readOffset()
long
readVariableSizeUnsigned(int size)
static void
setDebugFlags(DebugFlags debugFlag)
static void
setWarnings(boolean warn)
-
Methods inherited from class ucar.nc2.iosp.NCheader
checkFileType, formatName
-
-
-
-
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
-
getSizeOffsets
public byte getSizeOffsets()
- Specified by:
getSizeOffsets
in interfaceH5headerIF
-
getSizeLengths
public byte getSizeLengths()
- Specified by:
getSizeLengths
in interfaceH5headerIF
-
read
public void read(PrintWriter debugPS) throws IOException
- Throws:
IOException
-
convertEnums
protected Array convertEnums(Map<Integer,String> map, DataType dataType, Array values)
-
getDataObjects
public List<H5header.DataObject> getDataObjects()
-
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
-
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
-
close
public void close()
-
-