Package uk.ac.bristol.star.cdf.record
Enum Class NumericEncoding
- All Implemented Interfaces:
Serializable
,Comparable<NumericEncoding>
,Constable
Enumeration of numeric encoding values supported by CDF.
- Since:
- 20 Jun 2013
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic NumericEncoding
getEncoding
(int code) Returns the encoding corresponding to the value of theencoding
field of the CDF Descriptor Record.Gives the big/little-endianness of this encoding, if that's all the work that has to be done.static NumericEncoding
Returns the enum constant of this class with the specified name.static NumericEncoding[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NETWORK
-
SUN
-
NeXT
-
MAC
-
HP
-
SGi
-
IBMRS
-
DECSTATION
-
IBMPC
-
ALPHAOSF1
-
ALPHAVMSi
-
VAX
-
ALPHAVMSd
-
ALPHAVMSg
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isBigendian
Gives the big/little-endianness of this encoding, if that's all the work that has to be done. If the return value is non-null, then numeric values are encoded the same way that java does it (two's complement for integers and IEEE754 for floating point) with big- or little-endian byte ordering, according to the return value. Otherwise, some unspecified encoding is in operation.- Returns:
- TRUE for simple big-endian, FALSE for simple little-endian, null for something weird
-
getEncoding
Returns the encoding corresponding to the value of theencoding
field of the CDF Descriptor Record.- Parameters:
code
- encoding code- Returns:
- encoding object
- Throws:
CdfFormatException
- if code is unknown
-