uk.ac.starlink.feather

## Class NumberStarColumnWriter

- java.lang.Object
- - uk.ac.starlink.feather.StarColumnWriter
  - - uk.ac.starlink.feather.NumberStarColumnWriter

- All Implemented Interfaces:
    uk.ac.bristol.star.feather.FeatherColumnWriter

      public abstract class NumberStarColumnWriter
      extends StarColumnWriter

  StarColumnWriter implementation for numeric values.
  Since:
    27 Feb 2020

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class uk.ac.starlink.feather.StarColumnWriter

      `StarColumnWriter.DataStat`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `NumberStarColumnWriter(StarTable table, int icol, uk.ac.bristol.star.feather.FeatherType featherType, boolean isNullable, byte[] blank)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ItemAccumulator` | `createItemAccumulator(StoragePolicy storage)`
    `StarColumnWriter.DataStat` | `writeDataBytes(java.io.OutputStream out)` Writes the bytes consituting the data stream for this column, excluding any optional validity mask.
    `protected abstract void` | `writeNumber(java.io.OutputStream out, java.lang.Number value)` Writes the bytes for a given typed value.

    - ### Methods inherited from class uk.ac.starlink.feather.StarColumnWriter

      `getColumnIndex, getFeatherType, getName, getTable, getUserMetadata, isNullable, writeColumnBytes`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NumberStarColumnWriter

          protected NumberStarColumnWriter(StarTable table,
                                           int icol,
                                           uk.ac.bristol.star.feather.FeatherType featherType,
                                           boolean isNullable,
                                           byte[] blank)

      Constructor.
      Parameters:
        `table` - input table
        `icol` - column index
        `featherType` - output data type
        `isNullable` - true iff no in-band blank representation exists
        `blank` - byte pattern of blank value; the length of this array also defines the output item size in bytes

  - ### Method Detail

    - #### writeNumber

          protected abstract void writeNumber(java.io.OutputStream out,
                                              java.lang.Number value)
                                       throws java.io.IOException

      Writes the bytes for a given typed value.
      Parameters:
        `out` - destination stream
        `value` - non-null typed value to write
      Throws:
        `java.io.IOException`

    - #### writeDataBytes

          public StarColumnWriter.DataStat writeDataBytes(java.io.OutputStream out)
                                                   throws java.io.IOException

      Description copied from class: `StarColumnWriter`
      Writes the bytes consituting the data stream for this column, excluding any optional validity mask. Note the output does not need to be aligned on an 8-byte boundary.
      Specified by:
        `writeDataBytes` in class `StarColumnWriter`
      Parameters:
        `out` - destination stream
      Returns:
        information about what was actually written
      Throws:
        `java.io.IOException`

    - #### createItemAccumulator

          public ItemAccumulator createItemAccumulator(StoragePolicy storage)

      Specified by:
        `createItemAccumulator` in class `StarColumnWriter`