Public Member Functions | |
| void | close () throws Beatl2Exception |
| byte[] | getUint8 (int numElements) throws Beatl2Exception |
| byte[] | getUint8 (int numElements, int offset) throws Beatl2Exception |
| int[] | getIntegers (int numElements) throws Beatl2Exception |
| int[] | getIntegers (int numElements, int offset) throws Beatl2Exception |
| double[] | getDoubles (int numElements) throws Beatl2Exception |
| double[] | getDoubles (int numElements, int offset) throws Beatl2Exception |
| String[] | getStrings (int numElements) throws Beatl2Exception |
| String[] | getStrings (int numElements, int offset) throws Beatl2Exception |
| void | setDoubles (double[] doubleData) throws Beatl2Exception |
| void | setDoubles (int offset, double[] doubleData) throws Beatl2Exception |
| void | setStrings (String[] stringData) throws Beatl2Exception |
| void | setStrings (int offset, String[] stringData) throws Beatl2Exception |
| void | setIntegers (int[] intData) throws Beatl2Exception |
| void | setIntegers (int offset, int[] intData) throws Beatl2Exception |
| void | setUint8 (byte[] intData) throws Beatl2Exception |
| void | setUint8 (int offset, byte[] intData) throws Beatl2Exception |
BEAT-II DataType class.
In C the data for a BEAT-II record field is retrieved using a generic pointer that can be used to point to arrays of different primitive data types. Such pointers are not supported in Java. To be able to deal with field data from BEAT-II records, the DataType class has been made available. It is the Java representation of such a generic pointer and contains explicitly type retrieval and storage functions for Uint8s (mapped to the Java byte type), Integers (mapped to the Java int type), doubles (mapped to the Java double type) and character pointers (mapped to Java Strings).
The DataType object instance for a specific field is obtained from a BEAT-II Record instance using the getFieldData() method.
With these methods you can provide an offset and number of elements. Using these two parameters it is possible to set/get only part of the field data (the offset/num_elements parameters refer to the field data block, not to your own Java variable).
The offset is a one-dimensional index for the field data. For example, if your field data has dimensions [6,4] then you can read a maximum of 24 elements and the offset parameter can range from 0 to 23. When you set/get field data the funcion will always assume C array ordering (i.e. the last index is the fastest running).
| void close | ( | ) | throws Beatl2Exception |
Closes an open DataType. The DataType instance will be invalid after calling this method and should no longer be used.
This method will never cause any field data to be deleted. It only cleans up a handle to that data.
| Beatl2Exception | If an error occurred. |
| double [] getDoubles | ( | int | numElements, |
| int | offset | ||
| ) | throws Beatl2Exception |
Read an array of doubles.
| numElements | The number of elements to read from the field. |
| offset | The offset into the field's array. |
| Beatl2Exception | If an error occurred. |
| double [] getDoubles | ( | int | numElements | ) | throws Beatl2Exception |
Read an array of doubles.
| numElements | The number of elements to read from the field. |
| Beatl2Exception | If an error occurred. |
| int [] getIntegers | ( | int | numElements | ) | throws Beatl2Exception |
Read an array of integers.
| numElements | The number of elements to read from the field. |
| Beatl2Exception | If an error occurred. |
| int [] getIntegers | ( | int | numElements, |
| int | offset | ||
| ) | throws Beatl2Exception |
Read an array of integers.
| numElements | The number of elements to read from the field. |
| offset |
| Beatl2Exception | If an error occurred. |
| String [] getStrings | ( | int | numElements | ) | throws Beatl2Exception |
Read an array of Strings.
| numElements | The number of elements to read from the field. |
| Beatl2Exception | If an error occurred. |
| String [] getStrings | ( | int | numElements, |
| int | offset | ||
| ) | throws Beatl2Exception |
Read an array of Strings.
| numElements | The number of elements to read from the field. |
| offset |
| Beatl2Exception | If an error occurred. |
| byte [] getUint8 | ( | int | numElements, |
| int | offset | ||
| ) | throws Beatl2Exception |
Read an array of bytes.
| numElements | The number of elements to read from the field. |
| offset | The offset into the field's array. |
| Beatl2Exception | If an error occurred. |
| byte [] getUint8 | ( | int | numElements | ) | throws Beatl2Exception |
Read an array of bytes.
| numElements | The number of elements to read from the field. |
| Beatl2Exception | If an error occurred. |
| void setDoubles | ( | double[] | doubleData | ) | throws Beatl2Exception |
Set an array of doubles.
| doubleData | The elements to write to the field. |
| Beatl2Exception | If an error occurred. |
| void setDoubles | ( | int | offset, |
| double[] | doubleData | ||
| ) | throws Beatl2Exception |
| offset | The offset into the field's array. |
| doubleData | The elements to write to the field. |
| Beatl2Exception | If an error occurred. |
| void setIntegers | ( | int | offset, |
| int[] | intData | ||
| ) | throws Beatl2Exception |
| offset | The offset into the field's array. |
| intData | The elements to write to the field. |
| Beatl2Exception | If an error occurred. |
| void setIntegers | ( | int[] | intData | ) | throws Beatl2Exception |
| intData | The elements to write to the field. |
| Beatl2Exception | If an error occurred. |
| void setStrings | ( | String[] | stringData | ) | throws Beatl2Exception |
| stringData | The elements to write to the field. |
| Beatl2Exception | If an error occurred. |
| void setStrings | ( | int | offset, |
| String[] | stringData | ||
| ) | throws Beatl2Exception |
| offset | The offset into the field's array. |
| stringData | The elements to write to the field. |
| Beatl2Exception | If an error occurred. |
| void setUint8 | ( | int | offset, |
| byte[] | intData | ||
| ) | throws Beatl2Exception |
| offset | The offset into the field's array. |
| intData | The elements to write to the field. |
| Beatl2Exception | If an error occurred. |
| void setUint8 | ( | byte[] | intData | ) | throws Beatl2Exception |
| intData | The elements to write to the field. |
| Beatl2Exception | If an error occurred. |