Package uk.ac.bristol.star.cdf.record
Enum NumericEncoding
- java.lang.Object
-
- java.lang.Enum<NumericEncoding>
-
- uk.ac.bristol.star.cdf.record.NumericEncoding
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<NumericEncoding>
public enum NumericEncoding extends java.lang.Enum<NumericEncoding>
Enumeration of numeric encoding values supported by CDF.- Since:
- 20 Jun 2013
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NumericEncoding
getEncoding(int code)
Returns the encoding corresponding to the value of theencoding
field of the CDF Descriptor Record.java.lang.Boolean
isBigendian()
Gives the big/little-endianness of this encoding, if that's all the work that has to be done.static NumericEncoding
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static NumericEncoding[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NETWORK
public static final NumericEncoding NETWORK
-
SUN
public static final NumericEncoding SUN
-
NeXT
public static final NumericEncoding NeXT
-
MAC
public static final NumericEncoding MAC
-
HP
public static final NumericEncoding HP
-
SGi
public static final NumericEncoding SGi
-
IBMRS
public static final NumericEncoding IBMRS
-
DECSTATION
public static final NumericEncoding DECSTATION
-
IBMPC
public static final NumericEncoding IBMPC
-
ALPHAOSF1
public static final NumericEncoding ALPHAOSF1
-
ALPHAVMSi
public static final NumericEncoding ALPHAVMSi
-
VAX
public static final NumericEncoding VAX
-
ALPHAVMSd
public static final NumericEncoding ALPHAVMSd
-
ALPHAVMSg
public static final NumericEncoding ALPHAVMSg
-
-
Method Detail
-
values
public static NumericEncoding[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NumericEncoding c : NumericEncoding.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NumericEncoding valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isBigendian
public java.lang.Boolean 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
public static NumericEncoding getEncoding(int code) throws CdfFormatException
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
-
-