Class FloatWriter

Direct Known Subclasses:
ArcWriter

public class FloatWriter extends BinaryWriter
A float writer is a binary writer that writes data as a stream of 32-bit IEEE floating point values. The scaling and range methods are not supported and perform no function for 32-bit float data.
Since:
3.1.0
Author:
Mark Robinson
  • Constructor Details

  • Method Details

    • setRange

      public void setRange(double min, double max)
      Sets the scaling range. This method overrides the super class and simply sets the scaling to unity; scaling is not supported here.
      Overrides:
      setRange in class BinaryWriter
      Parameters:
      min - the minimum data value.
      max - the maximum data value.
    • setScaling

      public void setScaling(double[] scaling)
      Sets the scaling factor and offset. This method overrides the super class and simply sets the scaling to unity; scaling is not supported here.
      Overrides:
      setScaling in class BinaryWriter
      Parameters:
      scaling - the scaling as [factor, offset]. If null, [1,0] is used.
    • convertValue

      public byte[] convertValue(Number value)
      Description copied from class: BinaryWriter
      Converts a data value to a byte array. The byte array has a length appropriate for the subclass. The value must be in the range getTypeMin() to getTypeMax().
      Specified by:
      convertValue in class BinaryWriter
      Parameters:
      value - the value for conversion.
      Returns:
      an array of bytes.
    • getTypeMin

      public double getTypeMin()
      Description copied from class: BinaryWriter
      Gets the type minimum as a double.
      Specified by:
      getTypeMin in class BinaryWriter
    • getTypeMax

      public double getTypeMax()
      Description copied from class: BinaryWriter
      Gets the type maximum as a double.
      Specified by:
      getTypeMax in class BinaryWriter
    • getTypeRange

      public double getTypeRange()
      Throws an error because this method should never be called for this class.
      Specified by:
      getTypeRange in class BinaryWriter
    • getDefaultMissing

      public Number getDefaultMissing()
      Description copied from class: BinaryWriter
      Gets the default missing value.
      Specified by:
      getDefaultMissing in class BinaryWriter