Package nom.tam.util

Interface ArrayDataOutput

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, java.io.DataOutput, FitsIO
    All Known Implementing Classes:
    BufferedDataOutputStream, BufferedFile

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

      • flush

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

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

        void write​(boolean[] buf,
                   int offset,
                   int size)
            throws java.io.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:
        java.io.IOException - if one of the underlying write operations failed
      • write

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

        void write​(char[] buf,
                   int offset,
                   int size)
            throws java.io.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:
        java.io.IOException - if one of the underlying write operations failed
      • write

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

        void write​(double[] buf,
                   int offset,
                   int size)
            throws java.io.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:
        java.io.IOException - if one of the underlying write operations failed
      • write

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

        void write​(float[] buf,
                   int offset,
                   int size)
            throws java.io.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:
        java.io.IOException - if one of the underlying write operations failed
      • write

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

        void write​(int[] buf,
                   int offset,
                   int size)
            throws java.io.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:
        java.io.IOException - if one of the underlying write operations failed
      • write

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

        void write​(long[] buf,
                   int offset,
                   int size)
            throws java.io.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:
        java.io.IOException - if one of the underlying write operations failed
      • write

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

        void write​(short[] buf,
                   int offset,
                   int size)
            throws java.io.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:
        java.io.IOException - if one of the underlying write operations failed
      • write

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

        void write​(java.lang.String[] buf,
                   int offset,
                   int size)
            throws java.io.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:
        java.io.IOException - if one of the underlying write operations failed
      • writeArray

        void writeArray​(java.lang.Object o)
                 throws java.io.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:
        java.io.IOException - if one of the underlying write operations failed