Package nom.tam.util

Interface ArrayDataOutput

All Superinterfaces:
AutoCloseable, Closeable, DataOutput, FitsIO
All Known Implementing Classes:
BufferedDataOutputStream, BufferedFile

public interface ArrayDataOutput extends DataOutput, FitsIO
Special high performance scientific extension of the DataOutput interface.
  • Method Details

    • flush

      void flush() throws IOException
      Flush the output buffer
      Throws:
      IOException - if the flush of the underlying stream failed
    • write

      void write(boolean[] buf) throws IOException
      Write an array of boolean's.
      Parameters:
      buf - array of boolean's.
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(boolean[] buf, int offset, int size) throws IOException
      Write a segment of an array of boolean's.
      Parameters:
      buf - array of boolean's.
      offset - start index in the array
      size - number of array elements to write
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(char[] buf) throws IOException
      Write an array of char's.
      Parameters:
      buf - array of char's.
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(char[] buf, int offset, int size) throws IOException
      Write a segment of an array of char's.
      Parameters:
      buf - array of char's.
      offset - start index in the array
      size - number of array elements to write
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(double[] buf) throws IOException
      Write an array of double's.
      Parameters:
      buf - array of double's.
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(double[] buf, int offset, int size) throws IOException
      Write a segment of an array of double's.
      Parameters:
      buf - array of double's.
      offset - start index in the array
      size - number of array elements to write
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(float[] buf) throws IOException
      Write an array of float's.
      Parameters:
      buf - array of float's.
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(float[] buf, int offset, int size) throws IOException
      Write a segment of an array of float's.
      Parameters:
      buf - array of float's.
      offset - start index in the array
      size - number of array elements to write
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(int[] buf) throws IOException
      Write an array of int's.
      Parameters:
      buf - array of int's
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(int[] buf, int offset, int size) throws IOException
      Write a segment of an array of int's.
      Parameters:
      buf - array of int's
      offset - start index in the array
      size - number of array elements to write
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(long[] buf) throws IOException
      Write an array of longs.
      Parameters:
      buf - array of longs
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(long[] buf, int offset, int size) throws IOException
      Write a segment of an array of longs.
      Parameters:
      buf - array of longs
      offset - start index in the array
      size - number of array elements to write
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(short[] buf) throws IOException
      Write an array of shorts.
      Parameters:
      buf - the value to write
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(short[] buf, int offset, int size) throws IOException
      Write a segment of an array of shorts.
      Parameters:
      buf - the value to write
      offset - start index in the array
      size - number of array elements to write
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(String[] buf) throws IOException
      Write an array of Strings. Equivalent to calling writeBytes for the selected elements.
      Parameters:
      buf - the array to write
      Throws:
      IOException - if one of the underlying write operations failed
    • write

      void write(String[] buf, int offset, int size) throws IOException
      Write a segment of an array of Strings. Equivalent to calling writeBytes for the selected elements.
      Parameters:
      buf - the array to write
      offset - start index in the array
      size - number of array elements to write
      Throws:
      IOException - if one of the underlying write operations failed
    • writeArray

      void writeArray(Object o) throws IOException
      This routine provides efficient writing of arrays of any primitive type. The String class is also handled but it is an error to invoke this method with an object that is not an array of these types. If the array is multidimensional, then it calls itself recursively to write the entire array. Strings are written using the standard 1 byte format (i.e., as in writeBytes). If the array is an array of objects, then writePrimitiveArray will be called for each element of the array.
      Parameters:
      o - The object to be written. It must be an array of a primitive type, Object, or String.
      Throws:
      IOException - if one of the underlying write operations failed