![]() |
HDF
4.3.0
API Reference
|
This class encapsulates native methods to deal with arrays of numbers, converting from numbers to bytes and bytes to numbers.
These routines are used by class HDFArray to pass data to and from the HDF library.
Methods xxxToByte() convert a Java array of primitive numbers (int, short, ...) to a Java array of bytes. Methods byteToXxx() convert from a Java array of bytes into a Java array of primitive numbers (int, short, ...)
Variant interfaces convert a section of an array, and also can convert to sub-classes of Java Number.
See also: hdf.hdflib.HDFArray.
Static Public Member Functions | |
| static synchronized native int[] | byteToInt (byte[] data) |
| static synchronized native float[] | byteToFloat (byte[] data) |
| static synchronized native short[] | byteToShort (byte[] data) |
| static synchronized native long[] | byteToLong (byte[] data) |
| static synchronized native double[] | byteToDouble (byte[] data) |
| static synchronized native int[] | byteToInt (int start, int len, byte[] data) |
| static synchronized int | byteToInt (byte[] data, int start) |
| static synchronized native short[] | byteToShort (int start, int len, byte[] data) |
| static synchronized short | byteToShort (byte[] data, int start) |
| static synchronized native float[] | byteToFloat (int start, int len, byte[] data) |
| static synchronized float | byteToFloat (byte[] data, int start) |
| static synchronized native long[] | byteToLong (int start, int len, byte[] data) |
| static synchronized long | byteToLong (byte[] data, int start) |
| static synchronized native double[] | byteToDouble (int start, int len, byte[] data) |
| static synchronized double | byteToDouble (byte[] data, int start) |
| static synchronized native byte[] | intToByte (int start, int len, int[] data) |
| static synchronized native byte[] | shortToByte (int start, int len, short[] data) |
| static synchronized native byte[] | floatToByte (int start, int len, float[] data) |
| static synchronized native byte[] | longToByte (int start, int len, long[] data) |
| static synchronized native byte[] | doubleToByte (int start, int len, double[] data) |
| static synchronized native byte[] | byteToByte (byte data) |
| static synchronized byte[] | byteToByte (Byte data) |
| static synchronized native byte[] | intToByte (int data) |
| static synchronized byte[] | intToByte (Integer data) |
| static synchronized native byte[] | shortToByte (short data) |
| static synchronized byte[] | shortToByte (Short data) |
| static synchronized native byte[] | floatToByte (float data) |
| static synchronized byte[] | floatToByte (Float data) |
| static synchronized native byte[] | longToByte (long data) |
| static synchronized byte[] | longToByte (Long data) |
| static synchronized native byte[] | doubleToByte (double data) |
| static synchronized byte[] | doubleToByte (Double data) |
| static synchronized Object | byteToNumber (byte[] barray, Object obj) throws HDFException |
| static Object | defineDataObject (int dataType, int datasize) |
|
static |
Convert a single byte into an array of one byte.
(This is a trivial method.)
| data | The input byte |
|
static |
Convert a single Byte object into an array of one byte.
(This is an almost trivial method.)
| data | The input Byte |
|
static |
Convert an array of bytes into an array of double
| data | The input array of bytes |
|
static |
Convert 8 bytes from an array of bytes into a single double
| start | The position in the input array of bytes to start |
| data | The input array of bytes |
|
static |
Convert a range from an array of bytes into an array of double
| start | The position in the input array of bytes to start |
| len | The number of 'double' to convert |
| data | The input array of bytes |
|
static |
Convert an array of bytes into an array of floats
| data | The input array of bytes |
|
static |
Convert 4 bytes from an array of bytes into a single float
| start | The position in the input array of bytes to start |
| data | The input array of bytes |
|
static |
Convert a range from an array of bytes into an array of float
| start | The position in the input array of bytes to start |
| len | The number of 'float' to convert |
| data | The input array of bytes |
|
static |
Convert an array of bytes into an array of ints
| data | The input array of bytes |
|
static |
Convert 4 bytes from an array of bytes into a single int
| start | The position in the input array of bytes to start |
| data | The input array of bytes |
|
static |
Convert a range from an array of bytes into an array of int
| start | The position in the input array of bytes to start |
| len | The number of 'int' to convert |
| data | The input array of bytes |
|
static |
Convert an array of bytes into an array of long
| data | The input array of bytes |
|
static |
Convert 8 bytes from an array of bytes into a single long
| start | The position in the input array of bytes to start |
| data | The input array of bytes |
|
static |
Convert a range from an array of bytes into an array of long
| start | The position in the input array of bytes to start |
| len | The number of 'long' to convert |
| data | The input array of bytes |
|
static |
Create a Number object from an array of bytes.
| barray | The bytes to be converted |
| obj | Input object of the desired output class. Must be a sub-class of Number. |
| HDFException |
|
|
static |
Convert an array of bytes into an array of shorts
| data | The input array of bytes |
|
static |
Convert 2 bytes from an array of bytes into a single short
| start | The position in the input array of bytes to start |
| data | The input array of bytes |
|
static |
Convert a range from an array of bytes into an array of short
| start | The position in the input array of bytes to start |
| len | The number of 'short' to convert |
| data | The input array of bytes |
|
static |
Allocate a 1D array large enough to hold a multidimensional array of 'datasize' elements of 'dataType' numbers. This is called from hdf.hdfobject.HDFGR and hdf.hdfobject.HDFSDS, and hdf.io.ASCII2HDF
| dataType | the type of the image data |
| datasize | the size of the image data array |
|
static |
Convert a single double into an array of 8 bytes.
| data | The input double |
|
static |
Convert a single Double object into an array of 8 bytes.
| data | The input Double |
|
static |
Convert a range from an array of double into an array of bytes.
| start | The position in the input array of double to start |
| len | The number of 'double' to convert |
| data | The input array of double |
|
static |
Convert a single float into an array of 4 bytes.
| data | The input float |
|
static |
Convert a single Float object into an array of 4 bytes.
| data | The input Float |
|
static |
Convert a range from an array of float into an array of bytes.
| start | The position in the input array of int to start |
| len | The number of 'float' to convert |
| data | The input array of float |
|
static |
Convert a single int into an array of 4 bytes.
| data | The input int |
|
static |
Convert a range from an array of int into an array of bytes.
| start | The position in the input array of int to start |
| len | The number of 'int' to convert |
| data | The input array of int |
|
static |
Convert a single Integer object into an array of 4 bytes.
| data | The input Integer |
|
static |
Convert a range from an array of long into an array of bytes.
| start | The position in the input array of int to start |
| len | The number of 'long' to convert |
| data | The input array of long |
|
static |
Convert a single long into an array of 8 bytes.
| data | The input long |
|
static |
Convert a single Long object into an array of 8 bytes.
| data | The input Long |
|
static |
Convert a range from an array of short into an array of bytes.
| start | The position in the input array of int to start |
| len | The number of 'short' to convert |
| data | The input array of short |
|
static |
Convert a single short into an array of 2 bytes.
| data | The input short |
|
static |
Convert a single Short object into an array of 2 bytes.
| data | The input Short |