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 classH5header.DataObjectclassH5header.HeaderMessageclassH5header.MessageAttributeclassH5header.MessageDataspaceclassH5header.MessageDatatypestatic classH5header.MessageTypestatic classH5header.TypeInfoclassH5header.Vinfo
-
Field Summary
Fields Modifier and Type Field Description static StringHDF5_CLASSstatic StringHDF5_DIMENSION_LABELSstatic StringHDF5_DIMENSION_LISTstatic StringHDF5_DIMENSION_NAMEstatic StringHDF5_DIMENSION_SCALEstatic StringHDF5_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 voidclose()protected ArrayconvertEnums(Map<Integer,String> map, DataType dataType, Array values)List<H5header.DataObject>getDataObjects()longgetFileOffset(long address)intgetNumBytesFromMax(long maxNumber)RandomAccessFilegetRandomAccessFile()bytegetSizeLengths()bytegetSizeOffsets()booleanisOffsetLong()static booleanisValidFile(RandomAccessFile raf)intmakeIntFromBytes(byte[] bb, int start, int n)voidread(PrintWriter debugPS)longreadAddress()longreadLength()longreadOffset()longreadVariableSizeUnsigned(int size)static voidsetDebugFlags(DebugFlags debugFlag)static voidsetWarnings(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:
getSizeOffsetsin interfaceH5headerIF
-
getSizeLengths
public byte getSizeLengths()
- Specified by:
getSizeLengthsin 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:
makeIntFromBytesin interfaceH5headerIF
-
isOffsetLong
public boolean isOffsetLong()
- Specified by:
isOffsetLongin interfaceH5headerIF
-
readLength
public long readLength() throws IOException- Specified by:
readLengthin interfaceH5headerIF- Throws:
IOException
-
readOffset
public long readOffset() throws IOException- Specified by:
readOffsetin interfaceH5headerIF- Throws:
IOException
-
readAddress
public long readAddress() throws IOException- Specified by:
readAddressin interfaceH5headerIF- Throws:
IOException
-
getNumBytesFromMax
public int getNumBytesFromMax(long maxNumber)
- Specified by:
getNumBytesFromMaxin interfaceH5headerIF
-
readVariableSizeUnsigned
public long readVariableSizeUnsigned(int size) throws IOException- Specified by:
readVariableSizeUnsignedin interfaceH5headerIF- Throws:
IOException
-
getRandomAccessFile
public RandomAccessFile getRandomAccessFile()
- Specified by:
getRandomAccessFilein interfaceH5headerIF
-
getFileOffset
public long getFileOffset(long address)
- Specified by:
getFileOffsetin interfaceH5headerIF
-
close
public void close()
-
-