diff options
Diffstat (limited to 'java/src/hdf/hdf5lib')
-rw-r--r-- | java/src/hdf/hdf5lib/HDF5Constants.java | 425 | ||||
-rw-r--r-- | java/src/hdf/hdf5lib/HDFArray.java | 52 | ||||
-rw-r--r-- | java/src/hdf/hdf5lib/HDFNativeData.java | 30 |
3 files changed, 461 insertions, 46 deletions
diff --git a/java/src/hdf/hdf5lib/HDF5Constants.java b/java/src/hdf/hdf5lib/HDF5Constants.java index ad9ed70..4dadc67 100644 --- a/java/src/hdf/hdf5lib/HDF5Constants.java +++ b/java/src/hdf/hdf5lib/HDF5Constants.java @@ -33,6 +33,7 @@ public class HDF5Constants { // Get the HDF5 constants from the library // // ///////////////////////////////////////////////////////////////////////// + /** */ public static final long H5_QUARTER_HADDR_MAX = H5_QUARTER_HADDR_MAX(); /** Special parameters for szip compression */ @@ -63,45 +64,85 @@ public class HDF5Constants { public static final int H5_ITER_NATIVE = H5_ITER_NATIVE(); /** Common iteration orders, Number of iteration orders */ public static final int H5_ITER_N = H5_ITER_N(); + /** */ public static final int H5AC_CURR_CACHE_CONFIG_VERSION = H5AC_CURR_CACHE_CONFIG_VERSION(); + /** */ public static final int H5AC_MAX_TRACE_FILE_NAME_LEN = H5AC_MAX_TRACE_FILE_NAME_LEN(); + /** */ public static final int H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY = H5AC_METADATA_WRITE_STRATEGY_PROCESS_ZERO_ONLY(); + /** */ public static final int H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED = H5AC_METADATA_WRITE_STRATEGY_DISTRIBUTED(); + /** */ public static final int H5C_incr_off = H5C_incr_off(); + /** */ public static final int H5C_incr_threshold = H5C_incr_threshold(); + /** */ public static final int H5C_flash_incr_off = H5C_flash_incr_off(); + /** */ public static final int H5C_flash_incr_add_space = H5C_flash_incr_add_space(); + /** */ public static final int H5C_decr_off = H5C_decr_off(); + /** */ public static final int H5C_decr_threshold = H5C_decr_threshold(); + /** */ public static final int H5C_decr_age_out = H5C_decr_age_out(); + /** */ public static final int H5C_decr_age_out_with_threshold = H5C_decr_age_out_with_threshold(); + /** */ public static final int H5D_CHUNK_IDX_BTREE = H5D_CHUNK_IDX_BTREE(); + /** */ public static final int H5D_ALLOC_TIME_DEFAULT = H5D_ALLOC_TIME_DEFAULT(); + /** */ public static final int H5D_ALLOC_TIME_EARLY = H5D_ALLOC_TIME_EARLY(); + /** */ public static final int H5D_ALLOC_TIME_ERROR = H5D_ALLOC_TIME_ERROR(); + /** */ public static final int H5D_ALLOC_TIME_INCR = H5D_ALLOC_TIME_INCR(); + /** */ public static final int H5D_ALLOC_TIME_LATE = H5D_ALLOC_TIME_LATE(); + /** */ public static final int H5D_FILL_TIME_ERROR = H5D_FILL_TIME_ERROR(); + /** */ public static final int H5D_FILL_TIME_ALLOC = H5D_FILL_TIME_ALLOC(); + /** */ public static final int H5D_FILL_TIME_NEVER = H5D_FILL_TIME_NEVER(); + /** */ public static final int H5D_FILL_TIME_IFSET = H5D_FILL_TIME_IFSET(); + /** */ public static final int H5D_FILL_VALUE_DEFAULT = H5D_FILL_VALUE_DEFAULT(); + /** */ public static final int H5D_FILL_VALUE_ERROR = H5D_FILL_VALUE_ERROR(); + /** */ public static final int H5D_FILL_VALUE_UNDEFINED = H5D_FILL_VALUE_UNDEFINED(); + /** */ public static final int H5D_FILL_VALUE_USER_DEFINED = H5D_FILL_VALUE_USER_DEFINED(); + /** */ public static final int H5D_LAYOUT_ERROR = H5D_LAYOUT_ERROR(); + /** */ public static final int H5D_CHUNKED = H5D_CHUNKED(); + /** */ public static final int H5D_COMPACT = H5D_COMPACT(); + /** */ public static final int H5D_CONTIGUOUS = H5D_CONTIGUOUS(); + /** */ public static final int H5D_VIRTUAL = H5D_VIRTUAL(); + /** */ public static final int H5D_NLAYOUTS = H5D_NLAYOUTS(); + /** */ public static final int H5D_SPACE_STATUS_ALLOCATED = H5D_SPACE_STATUS_ALLOCATED(); + /** */ public static final int H5D_SPACE_STATUS_ERROR = H5D_SPACE_STATUS_ERROR(); + /** */ public static final int H5D_SPACE_STATUS_NOT_ALLOCATED = H5D_SPACE_STATUS_NOT_ALLOCATED(); + /** */ public static final int H5D_SPACE_STATUS_PART_ALLOCATED = H5D_SPACE_STATUS_PART_ALLOCATED(); + /** */ public static final int H5D_VDS_ERROR = H5D_VDS_ERROR(); + /** */ public static final int H5D_VDS_FIRST_MISSING = H5D_VDS_FIRST_MISSING(); + /** */ public static final int H5D_VDS_LAST_AVAILABLE = H5D_VDS_LAST_AVAILABLE(); + /** */ public static final int H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS = H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS(); /** Different kinds of error information - H5E_type_t */ @@ -453,90 +494,173 @@ public class HDF5Constants { /** Generic low-level file I/O errors - Write failed */ public static final long H5E_WRITEERROR = H5E_WRITEERROR(); + /** */ public static final int H5F_ACC_CREAT = H5F_ACC_CREAT(); + /** */ public static final int H5F_ACC_EXCL = H5F_ACC_EXCL(); + /** */ public static final int H5F_ACC_RDONLY = H5F_ACC_RDONLY(); + /** */ public static final int H5F_ACC_RDWR = H5F_ACC_RDWR(); + /** */ public static final int H5F_ACC_TRUNC = H5F_ACC_TRUNC(); + /** */ public static final int H5F_ACC_DEFAULT = H5F_ACC_DEFAULT(); + /** */ public static final int H5F_ACC_SWMR_READ = H5F_ACC_SWMR_READ(); + /** */ public static final int H5F_ACC_SWMR_WRITE = H5F_ACC_SWMR_WRITE(); + /** */ public static final int H5F_CLOSE_DEFAULT = H5F_CLOSE_DEFAULT(); + /** */ public static final int H5F_CLOSE_SEMI = H5F_CLOSE_SEMI(); + /** */ public static final int H5F_CLOSE_STRONG = H5F_CLOSE_STRONG(); + /** */ public static final int H5F_CLOSE_WEAK = H5F_CLOSE_WEAK(); + /** */ public static final int H5F_LIBVER_ERROR = H5F_LIBVER_ERROR(); + /** */ public static final int H5F_LIBVER_EARLIEST = H5F_LIBVER_EARLIEST(); + /** */ public static final int H5F_LIBVER_V18 = H5F_LIBVER_V18(); + /** */ public static final int H5F_LIBVER_V110 = H5F_LIBVER_V110(); + /** */ public static final int H5F_LIBVER_NBOUNDS = H5F_LIBVER_NBOUNDS(); + /** */ public static final int H5F_LIBVER_LATEST = H5F_LIBVER_LATEST(); + /** */ public static final int H5F_OBJ_ALL = H5F_OBJ_ALL(); + /** */ public static final int H5F_OBJ_ATTR = H5F_OBJ_ATTR(); + /** */ public static final int H5F_OBJ_DATASET = H5F_OBJ_DATASET(); + /** */ public static final int H5F_OBJ_DATATYPE = H5F_OBJ_DATATYPE(); + /** */ public static final int H5F_OBJ_FILE = H5F_OBJ_FILE(); + /** */ public static final int H5F_OBJ_GROUP = H5F_OBJ_GROUP(); + /** */ public static final int H5F_OBJ_LOCAL = H5F_OBJ_LOCAL(); + /** */ public static final int H5F_SCOPE_GLOBAL = H5F_SCOPE_GLOBAL(); + /** */ public static final int H5F_SCOPE_LOCAL = H5F_SCOPE_LOCAL(); + /** */ public static final int H5F_UNLIMITED = H5F_UNLIMITED(); + /** */ public static final int H5F_FSPACE_STRATEGY_FSM_AGGR = H5F_FSPACE_STRATEGY_FSM_AGGR(); + /** */ public static final int H5F_FSPACE_STRATEGY_AGGR = H5F_FSPACE_STRATEGY_AGGR(); + /** */ public static final int H5F_FSPACE_STRATEGY_PAGE = H5F_FSPACE_STRATEGY_PAGE(); + /** */ public static final int H5F_FSPACE_STRATEGY_NONE = H5F_FSPACE_STRATEGY_NONE(); + /** */ public static final int H5F_FSPACE_STRATEGY_NTYPES = H5F_FSPACE_STRATEGY_NTYPES(); + /** */ public static final long H5FD_CORE = H5FD_CORE(); + /** */ public static final long H5FD_DIRECT = H5FD_DIRECT(); + /** */ public static final long H5FD_FAMILY = H5FD_FAMILY(); + /** */ public static final long H5FD_LOG = H5FD_LOG(); + /** */ public static final long H5FD_MPIO = H5FD_MPIO(); + /** */ public static final long H5FD_MULTI = H5FD_MULTI(); + /** */ public static final long H5FD_SEC2 = H5FD_SEC2(); + /** */ public static final long H5FD_STDIO = H5FD_STDIO(); + /** */ public static final long H5FD_WINDOWS = H5FD_WINDOWS(); + /** */ public static final long H5FD_ROS3 = H5FD_ROS3(); + /** */ public static final long H5FD_HDFS = H5FD_HDFS(); + /** */ public static final int H5FD_LOG_LOC_READ = H5FD_LOG_LOC_READ(); + /** */ public static final int H5FD_LOG_LOC_WRITE = H5FD_LOG_LOC_WRITE(); + /** */ public static final int H5FD_LOG_LOC_SEEK = H5FD_LOG_LOC_SEEK(); + /** */ public static final int H5FD_LOG_LOC_IO = H5FD_LOG_LOC_IO(); + /** */ public static final int H5FD_LOG_FILE_READ = H5FD_LOG_FILE_READ(); + /** */ public static final int H5FD_LOG_FILE_WRITE = H5FD_LOG_FILE_WRITE(); + /** */ public static final int H5FD_LOG_FILE_IO = H5FD_LOG_FILE_IO(); + /** */ public static final int H5FD_LOG_FLAVOR = H5FD_LOG_FLAVOR(); + /** */ public static final int H5FD_LOG_NUM_READ = H5FD_LOG_NUM_READ(); + /** */ public static final int H5FD_LOG_NUM_WRITE = H5FD_LOG_NUM_WRITE(); + /** */ public static final int H5FD_LOG_NUM_SEEK = H5FD_LOG_NUM_SEEK(); + /** */ public static final int H5FD_LOG_NUM_TRUNCATE = H5FD_LOG_NUM_TRUNCATE(); + /** */ public static final int H5FD_LOG_NUM_IO = H5FD_LOG_NUM_IO(); + /** */ public static final int H5FD_LOG_TIME_OPEN = H5FD_LOG_TIME_OPEN(); + /** */ public static final int H5FD_LOG_TIME_STAT = H5FD_LOG_TIME_STAT(); + /** */ public static final int H5FD_LOG_TIME_READ = H5FD_LOG_TIME_READ(); + /** */ public static final int H5FD_LOG_TIME_WRITE = H5FD_LOG_TIME_WRITE(); + /** */ public static final int H5FD_LOG_TIME_SEEK = H5FD_LOG_TIME_SEEK(); + /** */ public static final int H5FD_LOG_TIME_CLOSE = H5FD_LOG_TIME_CLOSE(); + /** */ public static final int H5FD_LOG_TIME_IO = H5FD_LOG_TIME_IO(); + /** */ public static final int H5FD_LOG_ALLOC = H5FD_LOG_ALLOC(); + /** */ public static final int H5FD_LOG_ALL = H5FD_LOG_ALL(); + /** */ public static final int H5FD_MEM_NOLIST = H5FD_MEM_NOLIST(); + /** */ public static final int H5FD_MEM_DEFAULT = H5FD_MEM_DEFAULT(); + /** */ public static final int H5FD_MEM_SUPER = H5FD_MEM_SUPER(); + /** */ public static final int H5FD_MEM_BTREE = H5FD_MEM_BTREE(); + /** */ public static final int H5FD_MEM_DRAW = H5FD_MEM_DRAW(); + /** */ public static final int H5FD_MEM_GHEAP = H5FD_MEM_GHEAP(); + /** */ public static final int H5FD_MEM_LHEAP = H5FD_MEM_LHEAP(); + /** */ public static final int H5FD_MEM_OHDR = H5FD_MEM_OHDR(); + /** */ public static final int H5FD_MEM_NTYPES = H5FD_MEM_NTYPES(); + /** */ public static final long H5FD_DEFAULT_HADDR_SIZE = H5FD_DEFAULT_HADDR_SIZE(); + /** */ public static final long H5FD_MEM_DEFAULT_SIZE = H5FD_MEM_DEFAULT_SIZE(); + /** */ public static final long H5FD_MEM_DEFAULT_SUPER_SIZE = H5FD_MEM_DEFAULT_SUPER_SIZE(); + /** */ public static final long H5FD_MEM_DEFAULT_BTREE_SIZE = H5FD_MEM_DEFAULT_BTREE_SIZE(); + /** */ public static final long H5FD_MEM_DEFAULT_DRAW_SIZE = H5FD_MEM_DEFAULT_DRAW_SIZE(); + /** */ public static final long H5FD_MEM_DEFAULT_GHEAP_SIZE = H5FD_MEM_DEFAULT_GHEAP_SIZE(); + /** */ public static final long H5FD_MEM_DEFAULT_LHEAP_SIZE = H5FD_MEM_DEFAULT_LHEAP_SIZE(); + /** */ public static final long H5FD_MEM_DEFAULT_OHDR_SIZE = H5FD_MEM_DEFAULT_OHDR_SIZE(); // public static final int H5G_DATASET = H5G_DATASET(); @@ -556,107 +680,203 @@ public class HDF5Constants { // public static final int H5G_TYPE = H5G_TYPE(); // public static final int H5G_UNKNOWN = H5G_UNKNOWN(); + /** */ public static final int H5G_STORAGE_TYPE_UNKNOWN = H5G_STORAGE_TYPE_UNKNOWN(); + /** */ public static final int H5G_STORAGE_TYPE_SYMBOL_TABLE = H5G_STORAGE_TYPE_SYMBOL_TABLE(); + /** */ public static final int H5G_STORAGE_TYPE_COMPACT = H5G_STORAGE_TYPE_COMPACT(); + /** */ public static final int H5G_STORAGE_TYPE_DENSE = H5G_STORAGE_TYPE_DENSE(); + /** */ public static final int H5I_ATTR = H5I_ATTR(); + /** */ public static final int H5I_BADID = H5I_BADID(); + /** */ public static final int H5I_DATASET = H5I_DATASET(); + /** */ public static final int H5I_DATASPACE = H5I_DATASPACE(); + /** */ public static final int H5I_DATATYPE = H5I_DATATYPE(); + /** */ public static final int H5I_ERROR_CLASS = H5I_ERROR_CLASS(); + /** */ public static final int H5I_ERROR_MSG = H5I_ERROR_MSG(); + /** */ public static final int H5I_ERROR_STACK = H5I_ERROR_STACK(); + /** */ public static final int H5I_FILE = H5I_FILE(); + /** */ public static final int H5I_GENPROP_CLS = H5I_GENPROP_CLS(); + /** */ public static final int H5I_GENPROP_LST = H5I_GENPROP_LST(); + /** */ public static final int H5I_GROUP = H5I_GROUP(); + /** */ public static final int H5I_INVALID_HID = H5I_INVALID_HID(); + /** */ public static final int H5I_NTYPES = H5I_NTYPES(); + /** */ public static final int H5I_REFERENCE = H5I_REFERENCE(); + /** */ public static final int H5I_UNINIT = H5I_UNINIT(); + /** */ public static final int H5I_VFL = H5I_VFL(); + /** */ public static final int H5L_TYPE_ERROR = H5L_TYPE_ERROR(); + /** */ public static final int H5L_TYPE_HARD = H5L_TYPE_HARD(); + /** */ public static final int H5L_TYPE_SOFT = H5L_TYPE_SOFT(); + /** */ public static final int H5L_TYPE_EXTERNAL = H5L_TYPE_EXTERNAL(); + /** */ public static final int H5L_TYPE_MAX = H5L_TYPE_MAX(); + /** */ public static final int H5O_COPY_SHALLOW_HIERARCHY_FLAG = H5O_COPY_SHALLOW_HIERARCHY_FLAG(); + /** */ public static final int H5O_COPY_EXPAND_SOFT_LINK_FLAG = H5O_COPY_EXPAND_SOFT_LINK_FLAG(); + /** */ public static final int H5O_COPY_EXPAND_EXT_LINK_FLAG = H5O_COPY_EXPAND_EXT_LINK_FLAG(); + /** */ public static final int H5O_COPY_EXPAND_REFERENCE_FLAG = H5O_COPY_EXPAND_REFERENCE_FLAG(); + /** */ public static final int H5O_COPY_WITHOUT_ATTR_FLAG = H5O_COPY_WITHOUT_ATTR_FLAG(); + /** */ public static final int H5O_COPY_PRESERVE_NULL_FLAG = H5O_COPY_PRESERVE_NULL_FLAG(); + /** */ public static final int H5O_INFO_BASIC = H5O_INFO_BASIC(); + /** */ public static final int H5O_INFO_TIME = H5O_INFO_TIME(); + /** */ public static final int H5O_INFO_NUM_ATTRS = H5O_INFO_NUM_ATTRS(); + /** */ public static final int H5O_INFO_HDR = H5O_INFO_HDR(); + /** */ public static final int H5O_INFO_META_SIZE = H5O_INFO_META_SIZE(); + /** */ public static final int H5O_INFO_ALL = H5O_INFO_ALL(); + /** */ public static final int H5O_SHMESG_NONE_FLAG = H5O_SHMESG_NONE_FLAG(); + /** */ public static final int H5O_SHMESG_SDSPACE_FLAG = H5O_SHMESG_SDSPACE_FLAG(); + /** */ public static final int H5O_SHMESG_DTYPE_FLAG = H5O_SHMESG_DTYPE_FLAG(); + /** */ public static final int H5O_SHMESG_FILL_FLAG = H5O_SHMESG_FILL_FLAG(); + /** */ public static final int H5O_SHMESG_PLINE_FLAG = H5O_SHMESG_PLINE_FLAG(); + /** */ public static final int H5O_SHMESG_ATTR_FLAG = H5O_SHMESG_ATTR_FLAG(); + /** */ public static final int H5O_SHMESG_ALL_FLAG = H5O_SHMESG_ALL_FLAG(); + /** */ public static final int H5O_TYPE_UNKNOWN = H5O_TYPE_UNKNOWN(); + /** */ public static final int H5O_TYPE_GROUP = H5O_TYPE_GROUP(); + /** */ public static final int H5O_TYPE_DATASET = H5O_TYPE_DATASET(); + /** */ public static final int H5O_TYPE_NAMED_DATATYPE = H5O_TYPE_NAMED_DATATYPE(); + /** */ public static final int H5O_TYPE_NTYPES = H5O_TYPE_NTYPES(); + /** */ public static final long H5P_ROOT = H5P_ROOT(); + /** */ public static final long H5P_OBJECT_CREATE = H5P_OBJECT_CREATE(); + /** */ public static final long H5P_FILE_CREATE = H5P_FILE_CREATE(); + /** */ public static final long H5P_FILE_ACCESS = H5P_FILE_ACCESS(); + /** */ public static final long H5P_DATASET_CREATE = H5P_DATASET_CREATE(); + /** */ public static final long H5P_DATASET_ACCESS = H5P_DATASET_ACCESS(); + /** */ public static final long H5P_DATASET_XFER = H5P_DATASET_XFER(); + /** */ public static final long H5P_FILE_MOUNT = H5P_FILE_MOUNT(); + /** */ public static final long H5P_GROUP_CREATE = H5P_GROUP_CREATE(); + /** */ public static final long H5P_GROUP_ACCESS = H5P_GROUP_ACCESS(); + /** */ public static final long H5P_DATATYPE_CREATE = H5P_DATATYPE_CREATE(); + /** */ public static final long H5P_DATATYPE_ACCESS = H5P_DATATYPE_ACCESS(); + /** */ public static final long H5P_STRING_CREATE = H5P_STRING_CREATE(); + /** */ public static final long H5P_ATTRIBUTE_CREATE = H5P_ATTRIBUTE_CREATE(); + /** */ public static final long H5P_ATTRIBUTE_ACCESS = H5P_ATTRIBUTE_ACCESS(); + /** */ public static final long H5P_OBJECT_COPY = H5P_OBJECT_COPY(); + /** */ public static final long H5P_LINK_CREATE = H5P_LINK_CREATE(); + /** */ public static final long H5P_LINK_ACCESS = H5P_LINK_ACCESS(); + /** */ public static final long H5P_FILE_CREATE_DEFAULT = H5P_FILE_CREATE_DEFAULT(); + /** */ public static final long H5P_FILE_ACCESS_DEFAULT = H5P_FILE_ACCESS_DEFAULT(); + /** */ public static final long H5P_DATASET_CREATE_DEFAULT = H5P_DATASET_CREATE_DEFAULT(); + /** */ public static final long H5P_DATASET_ACCESS_DEFAULT = H5P_DATASET_ACCESS_DEFAULT(); + /** */ public static final long H5P_DATASET_XFER_DEFAULT = H5P_DATASET_XFER_DEFAULT(); + /** */ public static final long H5P_FILE_MOUNT_DEFAULT = H5P_FILE_MOUNT_DEFAULT(); + /** */ public static final long H5P_GROUP_CREATE_DEFAULT = H5P_GROUP_CREATE_DEFAULT(); + /** */ public static final long H5P_GROUP_ACCESS_DEFAULT = H5P_GROUP_ACCESS_DEFAULT(); + /** */ public static final long H5P_DATATYPE_CREATE_DEFAULT = H5P_DATATYPE_CREATE_DEFAULT(); + /** */ public static final long H5P_DATATYPE_ACCESS_DEFAULT = H5P_DATATYPE_ACCESS_DEFAULT(); + /** */ public static final long H5P_ATTRIBUTE_CREATE_DEFAULT = H5P_ATTRIBUTE_CREATE_DEFAULT(); + /** */ public static final long H5P_ATTRIBUTE_ACCESS_DEFAULT = H5P_ATTRIBUTE_ACCESS_DEFAULT(); + /** */ public static final long H5P_OBJECT_COPY_DEFAULT = H5P_OBJECT_COPY_DEFAULT(); + /** */ public static final long H5P_LINK_CREATE_DEFAULT = H5P_LINK_CREATE_DEFAULT(); + /** */ public static final long H5P_LINK_ACCESS_DEFAULT = H5P_LINK_ACCESS_DEFAULT(); + /** */ public static final int H5P_CRT_ORDER_TRACKED = H5P_CRT_ORDER_TRACKED(); + /** */ public static final int H5P_CRT_ORDER_INDEXED = H5P_CRT_ORDER_INDEXED(); + /** */ public static final long H5P_DEFAULT = H5P_DEFAULT(); + /** */ public static final int H5PL_TYPE_ERROR = H5PL_TYPE_ERROR(); + /** */ public static final int H5PL_TYPE_FILTER = H5PL_TYPE_FILTER(); + /** */ public static final int H5PL_TYPE_NONE = H5PL_TYPE_NONE(); + /** */ public static final int H5PL_FILTER_PLUGIN = H5PL_FILTER_PLUGIN(); + /** */ public static final int H5PL_ALL_PLUGIN = H5PL_ALL_PLUGIN(); + /** */ public static final int H5R_BADTYPE = H5R_BADTYPE(); + /** */ public static final int H5R_DATASET_REGION = H5R_DATASET_REGION(); + /** */ public static final int H5R_MAXTYPE = H5R_MAXTYPE(); + /** */ public static final int H5R_OBJ_REF_BUF_SIZE = H5R_OBJ_REF_BUF_SIZE(); + /** */ public static final int H5R_OBJECT = H5R_OBJECT(); /** Define atomic datatypes */ @@ -706,210 +926,415 @@ public class HDF5Constants { /** Define atomic datatypes */ public static final int H5S_UNLIMITED = H5S_UNLIMITED(); + /** */ public static final long H5T_ALPHA_B16 = H5T_ALPHA_B16(); + /** */ public static final long H5T_ALPHA_B32 = H5T_ALPHA_B32(); + /** */ public static final long H5T_ALPHA_B64 = H5T_ALPHA_B64(); + /** */ public static final long H5T_ALPHA_B8 = H5T_ALPHA_B8(); + /** */ public static final long H5T_ALPHA_F32 = H5T_ALPHA_F32(); + /** */ public static final long H5T_ALPHA_F64 = H5T_ALPHA_F64(); + /** */ public static final long H5T_ALPHA_I16 = H5T_ALPHA_I16(); + /** */ public static final long H5T_ALPHA_I32 = H5T_ALPHA_I32(); + /** */ public static final long H5T_ALPHA_I64 = H5T_ALPHA_I64(); + /** */ public static final long H5T_ALPHA_I8 = H5T_ALPHA_I8(); + /** */ public static final long H5T_ALPHA_U16 = H5T_ALPHA_U16(); + /** */ public static final long H5T_ALPHA_U32 = H5T_ALPHA_U32(); + /** */ public static final long H5T_ALPHA_U64 = H5T_ALPHA_U64(); + /** */ public static final long H5T_ALPHA_U8 = H5T_ALPHA_U8(); + /** */ public static final int H5T_ARRAY = H5T_ARRAY(); + /** */ public static final int H5T_BITFIELD = H5T_BITFIELD(); + /** */ public static final int H5T_BKG_NO = H5T_BKG_NO(); + /** */ public static final int H5T_BKG_YES = H5T_BKG_YES(); + /** */ public static final long H5T_C_S1 = H5T_C_S1(); + /** */ public static final int H5T_COMPOUND = H5T_COMPOUND(); + /** */ public static final int H5T_CONV_CONV = H5T_CONV_CONV(); + /** */ public static final int H5T_CONV_FREE = H5T_CONV_FREE(); + /** */ public static final int H5T_CONV_INIT = H5T_CONV_INIT(); + /** */ public static final int H5T_CSET_ERROR = H5T_CSET_ERROR(); + /** */ public static final int H5T_CSET_ASCII = H5T_CSET_ASCII(); + /** */ public static final int H5T_CSET_UTF8 = H5T_CSET_UTF8(); + /** */ public static final int H5T_CSET_RESERVED_10 = H5T_CSET_RESERVED_10(); + /** */ public static final int H5T_CSET_RESERVED_11 = H5T_CSET_RESERVED_11(); + /** */ public static final int H5T_CSET_RESERVED_12 = H5T_CSET_RESERVED_12(); + /** */ public static final int H5T_CSET_RESERVED_13 = H5T_CSET_RESERVED_13(); + /** */ public static final int H5T_CSET_RESERVED_14 = H5T_CSET_RESERVED_14(); + /** */ public static final int H5T_CSET_RESERVED_15 = H5T_CSET_RESERVED_15(); + /** */ public static final int H5T_CSET_RESERVED_2 = H5T_CSET_RESERVED_2(); + /** */ public static final int H5T_CSET_RESERVED_3 = H5T_CSET_RESERVED_3(); + /** */ public static final int H5T_CSET_RESERVED_4 = H5T_CSET_RESERVED_4(); + /** */ public static final int H5T_CSET_RESERVED_5 = H5T_CSET_RESERVED_5(); + /** */ public static final int H5T_CSET_RESERVED_6 = H5T_CSET_RESERVED_6(); + /** */ public static final int H5T_CSET_RESERVED_7 = H5T_CSET_RESERVED_7(); + /** */ public static final int H5T_CSET_RESERVED_8 = H5T_CSET_RESERVED_8(); + /** */ public static final int H5T_CSET_RESERVED_9 = H5T_CSET_RESERVED_9(); + /** */ public static final int H5T_DIR_ASCEND = H5T_DIR_ASCEND(); + /** */ public static final int H5T_DIR_DEFAULT = H5T_DIR_DEFAULT(); + /** */ public static final int H5T_DIR_DESCEND = H5T_DIR_DESCEND(); + /** */ public static final int H5T_ENUM = H5T_ENUM(); + /** */ public static final int H5T_FLOAT = H5T_FLOAT(); + /** */ public static final long H5T_FORTRAN_S1 = H5T_FORTRAN_S1(); + /** */ public static final long H5T_IEEE_F32BE = H5T_IEEE_F32BE(); + /** */ public static final long H5T_IEEE_F32LE = H5T_IEEE_F32LE(); + /** */ public static final long H5T_IEEE_F64BE = H5T_IEEE_F64BE(); + /** */ public static final long H5T_IEEE_F64LE = H5T_IEEE_F64LE(); + /** */ public static final int H5T_INTEGER = H5T_INTEGER(); + /** */ public static final long H5T_INTEL_B16 = H5T_INTEL_B16(); + /** */ public static final long H5T_INTEL_B32 = H5T_INTEL_B32(); + /** */ public static final long H5T_INTEL_B64 = H5T_INTEL_B64(); + /** */ public static final long H5T_INTEL_B8 = H5T_INTEL_B8(); + /** */ public static final long H5T_INTEL_F32 = H5T_INTEL_F32(); + /** */ public static final long H5T_INTEL_F64 = H5T_INTEL_F64(); + /** */ public static final long H5T_INTEL_I16 = H5T_INTEL_I16(); + /** */ public static final long H5T_INTEL_I32 = H5T_INTEL_I32(); + /** */ public static final long H5T_INTEL_I64 = H5T_INTEL_I64(); + /** */ public static final long H5T_INTEL_I8 = H5T_INTEL_I8(); + /** */ public static final long H5T_INTEL_U16 = H5T_INTEL_U16(); + /** */ public static final long H5T_INTEL_U32 = H5T_INTEL_U32(); + /** */ public static final long H5T_INTEL_U64 = H5T_INTEL_U64(); + /** */ public static final long H5T_INTEL_U8 = H5T_INTEL_U8(); + /** */ public static final long H5T_MIPS_B16 = H5T_MIPS_B16(); + /** */ public static final long H5T_MIPS_B32 = H5T_MIPS_B32(); + /** */ public static final long H5T_MIPS_B64 = H5T_MIPS_B64(); + /** */ public static final long H5T_MIPS_B8 = H5T_MIPS_B8(); + /** */ public static final long H5T_MIPS_F32 = H5T_MIPS_F32(); + /** */ public static final long H5T_MIPS_F64 = H5T_MIPS_F64(); + /** */ public static final long H5T_MIPS_I16 = H5T_MIPS_I16(); + /** */ public static final long H5T_MIPS_I32 = H5T_MIPS_I32(); + /** */ public static final long H5T_MIPS_I64 = H5T_MIPS_I64(); + /** */ public static final long H5T_MIPS_I8 = H5T_MIPS_I8(); + /** */ public static final long H5T_MIPS_U16 = H5T_MIPS_U16(); + /** */ public static final long H5T_MIPS_U32 = H5T_MIPS_U32(); + /** */ public static final long H5T_MIPS_U64 = H5T_MIPS_U64(); + /** */ public static final long H5T_MIPS_U8 = H5T_MIPS_U8(); + /** */ public static final long H5T_NATIVE_B16 = H5T_NATIVE_B16(); + /** */ public static final long H5T_NATIVE_B32 = H5T_NATIVE_B32(); + /** */ public static final long H5T_NATIVE_B64 = H5T_NATIVE_B64(); + /** */ public static final long H5T_NATIVE_B8 = H5T_NATIVE_B8(); + /** */ public static final long H5T_NATIVE_CHAR = H5T_NATIVE_CHAR(); + /** */ public static final long H5T_NATIVE_DOUBLE = H5T_NATIVE_DOUBLE(); + /** */ public static final long H5T_NATIVE_FLOAT = H5T_NATIVE_FLOAT(); + /** */ public static final long H5T_NATIVE_HADDR = H5T_NATIVE_HADDR(); + /** */ public static final long H5T_NATIVE_HBOOL = H5T_NATIVE_HBOOL(); + /** */ public static final long H5T_NATIVE_HERR = H5T_NATIVE_HERR(); + /** */ public static final long H5T_NATIVE_HSIZE = H5T_NATIVE_HSIZE(); + /** */ public static final long H5T_NATIVE_HSSIZE = H5T_NATIVE_HSSIZE(); + /** */ public static final long H5T_NATIVE_INT = H5T_NATIVE_INT(); + /** */ public static final long H5T_NATIVE_INT_FAST16 = H5T_NATIVE_INT_FAST16(); + /** */ public static final long H5T_NATIVE_INT_FAST32 = H5T_NATIVE_INT_FAST32(); + /** */ public static final long H5T_NATIVE_INT_FAST64 = H5T_NATIVE_INT_FAST64(); + /** */ public static final long H5T_NATIVE_INT_FAST8 = H5T_NATIVE_INT_FAST8(); + /** */ public static final long H5T_NATIVE_INT_LEAST16 = H5T_NATIVE_INT_LEAST16(); + /** */ public static final long H5T_NATIVE_INT_LEAST32 = H5T_NATIVE_INT_LEAST32(); + /** */ public static final long H5T_NATIVE_INT_LEAST64 = H5T_NATIVE_INT_LEAST64(); + /** */ public static final long H5T_NATIVE_INT_LEAST8 = H5T_NATIVE_INT_LEAST8(); + /** */ public static final long H5T_NATIVE_INT16 = H5T_NATIVE_INT16(); + /** */ public static final long H5T_NATIVE_INT32 = H5T_NATIVE_INT32(); + /** */ public static final long H5T_NATIVE_INT64 = H5T_NATIVE_INT64(); + /** */ public static final long H5T_NATIVE_INT8 = H5T_NATIVE_INT8(); + /** */ public static final long H5T_NATIVE_LDOUBLE = H5T_NATIVE_LDOUBLE(); + /** */ public static final long H5T_NATIVE_LLONG = H5T_NATIVE_LLONG(); + /** */ public static final long H5T_NATIVE_LONG = H5T_NATIVE_LONG(); + /** */ public static final long H5T_NATIVE_OPAQUE = H5T_NATIVE_OPAQUE(); + /** */ public static final long H5T_NATIVE_SCHAR = H5T_NATIVE_SCHAR(); + /** */ public static final long H5T_NATIVE_SHORT = H5T_NATIVE_SHORT(); + /** */ public static final long H5T_NATIVE_UCHAR = H5T_NATIVE_UCHAR(); + /** */ public static final long H5T_NATIVE_UINT = H5T_NATIVE_UINT(); + /** */ public static final long H5T_NATIVE_UINT_FAST16 = H5T_NATIVE_UINT_FAST16(); + /** */ public static final long H5T_NATIVE_UINT_FAST32 = H5T_NATIVE_UINT_FAST32(); + /** */ public static final long H5T_NATIVE_UINT_FAST64 = H5T_NATIVE_UINT_FAST64(); + /** */ public static final long H5T_NATIVE_UINT_FAST8 = H5T_NATIVE_UINT_FAST8(); + /** */ public static final long H5T_NATIVE_UINT_LEAST16 = H5T_NATIVE_UINT_LEAST16(); + /** */ public static final long H5T_NATIVE_UINT_LEAST32 = H5T_NATIVE_UINT_LEAST32(); + /** */ public static final long H5T_NATIVE_UINT_LEAST64 = H5T_NATIVE_UINT_LEAST64(); + /** */ public static final long H5T_NATIVE_UINT_LEAST8 = H5T_NATIVE_UINT_LEAST8(); + /** */ public static final long H5T_NATIVE_UINT16 = H5T_NATIVE_UINT16(); + /** */ public static final long H5T_NATIVE_UINT32 = H5T_NATIVE_UINT32(); + /** */ public static final long H5T_NATIVE_UINT64 = H5T_NATIVE_UINT64(); + /** */ public static final long H5T_NATIVE_UINT8 = H5T_NATIVE_UINT8(); + /** */ public static final long H5T_NATIVE_ULLONG = H5T_NATIVE_ULLONG(); + /** */ public static final long H5T_NATIVE_ULONG = H5T_NATIVE_ULONG(); + /** */ public static final long H5T_NATIVE_USHORT = H5T_NATIVE_USHORT(); + /** */ public static final int H5T_NCLASSES = H5T_NCLASSES(); + /** */ public static final int H5T_NO_CLASS = H5T_NO_CLASS(); + /** */ public static final int H5T_NORM_ERROR = H5T_NORM_ERROR(); + /** */ public static final int H5T_NORM_IMPLIED = H5T_NORM_IMPLIED(); + /** */ public static final int H5T_NORM_MSBSET = H5T_NORM_MSBSET(); + /** */ public static final int H5T_NORM_NONE = H5T_NORM_NONE(); + /** */ public static final int H5T_NPAD = H5T_NPAD(); + /** */ public static final int H5T_NSGN = H5T_NSGN(); + /** */ public static final int H5T_OPAQUE = H5T_OPAQUE(); + /** */ public static final int H5T_OPAQUE_TAG_MAX = H5T_OPAQUE_TAG_MAX(); /* 1.6.5 */ + /** */ public static final int H5T_ORDER_BE = H5T_ORDER_BE(); + /** */ public static final int H5T_ORDER_ERROR = H5T_ORDER_ERROR(); + /** */ public static final int H5T_ORDER_LE = H5T_ORDER_LE(); + /** */ public static final int H5T_ORDER_NONE = H5T_ORDER_NONE(); + /** */ public static final int H5T_ORDER_VAX = H5T_ORDER_VAX(); + /** */ public static final int H5T_PAD_BACKGROUND = H5T_PAD_BACKGROUND(); + /** */ public static final int H5T_PAD_ERROR = H5T_PAD_ERROR(); + /** */ public static final int H5T_PAD_ONE = H5T_PAD_ONE(); + /** */ public static final int H5T_PAD_ZERO = H5T_PAD_ZERO(); + /** */ public static final int H5T_PERS_DONTCARE = H5T_PERS_DONTCARE(); + /** */ public static final int H5T_PERS_HARD = H5T_PERS_HARD(); + /** */ public static final int H5T_PERS_SOFT = H5T_PERS_SOFT(); + /** */ public static final int H5T_REFERENCE = H5T_REFERENCE(); + /** */ public static final int H5T_SGN_2 = H5T_SGN_2(); + /** */ public static final int H5T_SGN_ERROR = H5T_SGN_ERROR(); + /** */ public static final int H5T_SGN_NONE = H5T_SGN_NONE(); + /** */ public static final long H5T_STD_B16BE = H5T_STD_B16BE(); + /** */ public static final long H5T_STD_B16LE = H5T_STD_B16LE(); + /** */ public static final long H5T_STD_B32BE = H5T_STD_B32BE(); + /** */ public static final long H5T_STD_B32LE = H5T_STD_B32LE(); + /** */ public static final long H5T_STD_B64BE = H5T_STD_B64BE(); + /** */ public static final long H5T_STD_B64LE = H5T_STD_B64LE(); + /** */ public static final long H5T_STD_B8BE = H5T_STD_B8BE(); + /** */ public static final long H5T_STD_B8LE = H5T_STD_B8LE(); + /** */ public static final long H5T_STD_I16BE = H5T_STD_I16BE(); + /** */ public static final long H5T_STD_I16LE = H5T_STD_I16LE(); + /** */ public static final long H5T_STD_I32BE = H5T_STD_I32BE(); + /** */ public static final long H5T_STD_I32LE = H5T_STD_I32LE(); + /** */ public static final long H5T_STD_I64BE = H5T_STD_I64BE(); + /** */ public static final long H5T_STD_I64LE = H5T_STD_I64LE(); + /** */ public static final long H5T_STD_I8BE = H5T_STD_I8BE(); + /** */ public static final long H5T_STD_I8LE = H5T_STD_I8LE(); + /** */ public static final long H5T_STD_REF_DSETREG = H5T_STD_REF_DSETREG(); + /** */ public static final long H5T_STD_REF_OBJ = H5T_STD_REF_OBJ(); + /** */ public static final long H5T_STD_U16BE = H5T_STD_U16BE(); + /** */ public static final long H5T_STD_U16LE = H5T_STD_U16LE(); + /** */ public static final long H5T_STD_U32BE = H5T_STD_U32BE(); + /** */ public static final long H5T_STD_U32LE = H5T_STD_U32LE(); + /** */ public static final long H5T_STD_U64BE = H5T_STD_U64BE(); + /** */ public static final long H5T_STD_U64LE = H5T_STD_U64LE(); + /** */ public static final long H5T_STD_U8BE = H5T_STD_U8BE(); + /** */ public static final long H5T_STD_U8LE = H5T_STD_U8LE(); + /** */ public static final int H5T_STR_ERROR = H5T_STR_ERROR(); + /** */ public static final int H5T_STR_NULLPAD = H5T_STR_NULLPAD(); + /** */ public static final int H5T_STR_NULLTERM = H5T_STR_NULLTERM(); + /** */ public static final int H5T_STR_RESERVED_10 = H5T_STR_RESERVED_10(); + /** */ public static final int H5T_STR_RESERVED_11 = H5T_STR_RESERVED_11(); + /** */ public static final int H5T_STR_RESERVED_12 = H5T_STR_RESERVED_12(); + /** */ public static final int H5T_STR_RESERVED_13 = H5T_STR_RESERVED_13(); + /** */ public static final int H5T_STR_RESERVED_14 = H5T_STR_RESERVED_14(); + /** */ public static final int H5T_STR_RESERVED_15 = H5T_STR_RESERVED_15(); + /** */ public static final int H5T_STR_RESERVED_3 = H5T_STR_RESERVED_3(); + /** */ public static final int H5T_STR_RESERVED_4 = H5T_STR_RESERVED_4(); + /** */ public static final int H5T_STR_RESERVED_5 = H5T_STR_RESERVED_5(); + /** */ public static final int H5T_STR_RESERVED_6 = H5T_STR_RESERVED_6(); + /** */ public static final int H5T_STR_RESERVED_7 = H5T_STR_RESERVED_7(); + /** */ public static final int H5T_STR_RESERVED_8 = H5T_STR_RESERVED_8(); + /** */ public static final int H5T_STR_RESERVED_9 = H5T_STR_RESERVED_9(); + /** */ public static final int H5T_STR_SPACEPAD = H5T_STR_SPACEPAD(); + /** */ public static final int H5T_STRING = H5T_STRING(); + /** */ public static final int H5T_TIME = H5T_TIME(); + /** */ public static final long H5T_UNIX_D32BE = H5T_UNIX_D32BE(); + /** */ public static final long H5T_UNIX_D32LE = H5T_UNIX_D32LE(); + /** */ public static final long H5T_UNIX_D64BE = H5T_UNIX_D64BE(); + /** */ public static final long H5T_UNIX_D64LE = H5T_UNIX_D64LE(); + /** */ public static final long H5T_VARIABLE = H5T_VARIABLE(); + /** */ public static final int H5T_VLEN = H5T_VLEN(); + /** */ public static final int H5T_VL_T = H5T_VL_T(); /** Return values for filter callback function */ diff --git a/java/src/hdf/hdf5lib/HDFArray.java b/java/src/hdf/hdf5lib/HDFArray.java index bb9357e..21e2b02 100644 --- a/java/src/hdf/hdf5lib/HDFArray.java +++ b/java/src/hdf/hdf5lib/HDFArray.java @@ -46,10 +46,10 @@ public class HDFArray { * * @param anArray * The array object. - * @exception hdf.hdf5lib.exceptions.HDF5Exception - * object is not an array. + * @exception hdf.hdf5lib.exceptions.HDF5JavaException + * object is not an array. */ - public HDFArray(Object anArray) throws HDF5Exception + public HDFArray(Object anArray) throws HDF5JavaException { if (anArray == null) { HDF5JavaException ex = new HDF5JavaException("HDFArray: array is null?: "); @@ -76,16 +76,14 @@ public class HDFArray { * @return A one-D array of bytes, filled with zeroes. The bytes are sufficient to hold the data of the Array passed * to the constructor. * @exception hdf.hdf5lib.exceptions.HDF5JavaException - * Allocation failed. + * Allocation failed. */ - public byte[] emptyBytes() - throws HDF5JavaException + public byte[] emptyBytes() throws HDF5JavaException { byte[] b = null; - if ((ArrayDescriptor.dims == 1) - && (ArrayDescriptor.NT == 'B')) { + if ((ArrayDescriptor.dims == 1) && (ArrayDescriptor.NT == 'B')) { b = (byte[]) _theArray; } else { @@ -103,10 +101,9 @@ public class HDFArray { * * @return A one-D array of bytes, constructed from the Array passed to the constructor. * @exception hdf.hdf5lib.exceptions.HDF5JavaException - * the object not an array or other internal error. + * the object not an array or other internal error. */ - public byte[] byteify() - throws HDF5JavaException + public byte[] byteify() throws HDF5JavaException { if (_barray != null) { return _barray; @@ -224,8 +221,6 @@ public class HDFArray { if (ArrayDescriptor.NT == 'J') { arow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); - arow = HDFNativeData.longToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], - (long[]) ArrayDescriptor.objs[ArrayDescriptor.dims - 1]); } else if (ArrayDescriptor.NT == 'I') { arow = HDFNativeData.intToByte(0, ArrayDescriptor.dimlen[ArrayDescriptor.dims], @@ -552,8 +547,7 @@ public class HDFArray { + "?")); } } - if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] != ArrayDescriptor.dimlen[ArrayDescriptor.dims - - 1]) { + if (ArrayDescriptor.currentindex[ArrayDescriptor.dims - 1] != ArrayDescriptor.dimlen[ArrayDescriptor.dims - 1]) { throw new java.lang.InternalError( new String("HDFArray::arrayify Panic didn't complete all data: currentindex[" + i + "] = " + ArrayDescriptor.currentindex[i] + " (should be " + (ArrayDescriptor.dimlen[i]) + "?")); @@ -580,7 +574,7 @@ public class HDFArray { Integer[] out = new Integer[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Integer(in[i]); + out[i] = Integer.valueOf(in[i]); } return out; } @@ -592,7 +586,7 @@ public class HDFArray { Integer[] out = new Integer[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Integer(in[i]); + out[i] = Integer.valueOf(in[i]); } return out; } @@ -615,7 +609,7 @@ public class HDFArray { Short[] out = new Short[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Short(in[i]); + out[i] = Short.valueOf(in[i]); } return out; } @@ -627,7 +621,7 @@ public class HDFArray { Short[] out = new Short[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Short(in[i]); + out[i] = Short.valueOf(in[i]); } return out; } @@ -649,7 +643,7 @@ public class HDFArray { Byte[] out = new Byte[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Byte(bin[i]); + out[i] = Byte.valueOf(bin[i]); } return out; } @@ -659,7 +653,7 @@ public class HDFArray { Byte[] out = new Byte[len]; for (int i = 0; i < len; i++) { - out[i] = new Byte(bin[i]); + out[i] = Byte.valueOf(bin[i]); } return out; } @@ -682,7 +676,7 @@ public class HDFArray { Float[] out = new Float[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Float(in[i]); + out[i] = Float.valueOf(in[i]); } return out; } @@ -694,7 +688,7 @@ public class HDFArray { Float[] out = new Float[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Float(in[i]); + out[i] = Float.valueOf(in[i]); } return out; } @@ -717,7 +711,7 @@ public class HDFArray { Double[] out = new Double[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Double(in[i]); + out[i] = Double.valueOf(in[i]); } return out; } @@ -729,7 +723,7 @@ public class HDFArray { Double[] out = new Double[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Double(in[i]); + out[i] = Double.valueOf(in[i]); } return out; } @@ -752,7 +746,7 @@ public class HDFArray { Long[] out = new Long[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Long(in[i]); + out[i] = Long.valueOf(in[i]); } return out; } @@ -764,7 +758,7 @@ public class HDFArray { Long[] out = new Long[nelems]; for (int i = 0; i < nelems; i++) { - out[i] = new Long(in[i]); + out[i] = Long.valueOf(in[i]); } return out; } @@ -790,12 +784,12 @@ class ArrayDescriptor { static int dims = 0; static String className; - public ArrayDescriptor(Object anArray) throws HDF5Exception + public ArrayDescriptor(Object anArray) throws HDF5JavaException { Class tc = anArray.getClass(); if (tc.isArray() == false) { /* exception: not an array */ - HDF5Exception ex = new HDF5JavaException("ArrayDescriptor: not an array?: "); + HDF5JavaException ex = new HDF5JavaException("ArrayDescriptor: not an array?: "); throw (ex); } diff --git a/java/src/hdf/hdf5lib/HDFNativeData.java b/java/src/hdf/hdf5lib/HDFNativeData.java index 5b29050..85378db 100644 --- a/java/src/hdf/hdf5lib/HDFNativeData.java +++ b/java/src/hdf/hdf5lib/HDFNativeData.java @@ -153,8 +153,7 @@ public class HDFNativeData { * The input array of bytes * @return an array of 'len' float */ - public synchronized static native float[] byteToFloat(int start, int len, - byte[] data); + public synchronized static native float[] byteToFloat(int start, int len, byte[] data); /** * Convert 4 bytes from an array of bytes into a single float @@ -437,41 +436,38 @@ public class HDFNativeData { * - Error unsupported type. */ public synchronized static Object byteToNumber(byte[] barray, Object obj) - throws HDF5Exception { + throws HDF5Exception + { Class theClass = obj.getClass(); String type = theClass.getName(); Object retobj = null; if (type.equals("java.lang.Integer")) { int[] i = hdf.hdf5lib.HDFNativeData.byteToInt(0, 1, barray); - retobj = new Integer(i[0]); + retobj = Integer.valueOf(i[0]); } else if (type.equals("java.lang.Byte")) { - retobj = new Byte(barray[0]); + retobj = Byte.valueOf(barray[0]); } else if (type.equals("java.lang.Short")) { - short[] f = hdf.hdf5lib.HDFNativeData - .byteToShort(0, 1, barray); - retobj = new Short(f[0]); + short[] f = hdf.hdf5lib.HDFNativeData.byteToShort(0, 1, barray); + retobj = Short.valueOf(f[0]); } else if (type.equals("java.lang.Float")) { - float[] f = hdf.hdf5lib.HDFNativeData - .byteToFloat(0, 1, barray); - retobj = new Float(f[0]); + float[] f = hdf.hdf5lib.HDFNativeData.byteToFloat(0, 1, barray); + retobj = Float.valueOf(f[0]); } else if (type.equals("java.lang.Long")) { long[] f = hdf.hdf5lib.HDFNativeData.byteToLong(0, 1, barray); - retobj = new Long(f[0]); + retobj = Long.valueOf(f[0]); } else if (type.equals("java.lang.Double")) { - double[] f = hdf.hdf5lib.HDFNativeData.byteToDouble(0, 1, - barray); - retobj = new Double(f[0]); + double[] f = hdf.hdf5lib.HDFNativeData.byteToDouble(0, 1, barray); + retobj = Double.valueOf(f[0]); } else { /* exception: unsupported type */ - HDF5Exception ex = new HDF5JavaException( - "byteToNumber: setfield bad type: " + obj + " " + type); + HDF5Exception ex = new HDF5JavaException("byteToNumber: setfield bad type: " + obj + " " + type); throw (ex); } return (retobj); |