Enum Class NumericEncoding

java.lang.Object
java.lang.Enum<NumericEncoding>
uk.ac.bristol.star.cdf.record.NumericEncoding
All Implemented Interfaces:
Serializable, Comparable<NumericEncoding>, Constable

public enum NumericEncoding extends Enum<NumericEncoding>
Enumeration of numeric encoding values supported by CDF.
Since:
20 Jun 2013
  • Enum Constant Details

  • Method Details

    • values

      public static NumericEncoding[] 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

      public static NumericEncoding valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isBigendian

      public 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 the encoding field of the CDF Descriptor Record.
      Parameters:
      code - encoding code
      Returns:
      encoding object
      Throws:
      CdfFormatException - if code is unknown