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.
-
-
Field Summary
-
Fields inherited from interface nom.tam.util.FitsIO
BITS_OF_1_BYTE, BITS_OF_2_BYTES, BITS_OF_3_BYTES, BITS_OF_4_BYTES, BITS_OF_5_BYTES, BITS_OF_6_BYTES, BITS_OF_7_BYTES, BYTE_1_OF_LONG_MASK, BYTE_2_OF_LONG_MASK, BYTE_3_OF_LONG_MASK, BYTE_4_OF_LONG_MASK, BYTE_MASK, BYTES_IN_BOOLEAN, BYTES_IN_BYTE, BYTES_IN_CHAR, BYTES_IN_DOUBLE, BYTES_IN_FLOAT, BYTES_IN_INTEGER, BYTES_IN_LONG, BYTES_IN_SHORT, DEFAULT_BUFFER_SIZE, HIGH_INTEGER_MASK, INTEGER_MASK, SHORT_MASK, SHORT_OF_LONG_MASK
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidflush()Flush the output buffervoidwrite(boolean[] buf)Write an array of boolean's.voidwrite(boolean[] buf, int offset, int size)Write a segment of an array of boolean's.voidwrite(char[] buf)Write an array of char's.voidwrite(char[] buf, int offset, int size)Write a segment of an array of char's.voidwrite(double[] buf)Write an array of double's.voidwrite(double[] buf, int offset, int size)Write a segment of an array of double's.voidwrite(float[] buf)Write an array of float's.voidwrite(float[] buf, int offset, int size)Write a segment of an array of float's.voidwrite(int[] buf)Write an array of int's.voidwrite(int[] buf, int offset, int size)Write a segment of an array of int's.voidwrite(long[] buf)Write an array of longs.voidwrite(long[] buf, int offset, int size)Write a segment of an array of longs.voidwrite(short[] buf)Write an array of shorts.voidwrite(short[] buf, int offset, int size)Write a segment of an array of shorts.voidwrite(java.lang.String[] buf)Write an array of Strings.voidwrite(java.lang.String[] buf, int offset, int size)Write a segment of an array of Strings.voidwriteArray(java.lang.Object o)This routine provides efficient writing of arrays of any primitive type.
-
-
-
Method Detail
-
flush
void flush() throws java.io.IOExceptionFlush the output buffer- Throws:
java.io.IOException- if the flush of the underlying stream failed
-
write
void write(boolean[] buf) throws java.io.IOExceptionWrite 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.IOExceptionWrite a segment of an array of boolean's.- Parameters:
buf- array of boolean's.offset- start index in the arraysize- 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.IOExceptionWrite 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.IOExceptionWrite a segment of an array of char's.- Parameters:
buf- array of char's.offset- start index in the arraysize- 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.IOExceptionWrite 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.IOExceptionWrite a segment of an array of double's.- Parameters:
buf- array of double's.offset- start index in the arraysize- 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.IOExceptionWrite 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.IOExceptionWrite a segment of an array of float's.- Parameters:
buf- array of float's.offset- start index in the arraysize- 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.IOExceptionWrite 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.IOExceptionWrite a segment of an array of int's.- Parameters:
buf- array of int'soffset- start index in the arraysize- 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.IOExceptionWrite 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.IOExceptionWrite a segment of an array of longs.- Parameters:
buf- array of longsoffset- start index in the arraysize- 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.IOExceptionWrite 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.IOExceptionWrite a segment of an array of shorts.- Parameters:
buf- the value to writeoffset- start index in the arraysize- 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.IOExceptionWrite 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.IOExceptionWrite a segment of an array of Strings. Equivalent to calling writeBytes for the selected elements.- Parameters:
buf- the array to writeoffset- start index in the arraysize- 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.IOExceptionThis 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
-
-