1 package nom.tam.util;
\r
3 import java.io.IOException;
\r
5 public interface ArrayDataOutput extends java.io.DataOutput {
\r
7 /** Write a generic (possibly multi-dimenionsional) primitive or String
\r
8 * array. An array of Objects is also allowed if all
\r
9 * of the elements are valid arrays.
\r
11 * This routine is not called 'write' to avoid possible compilation
\r
12 * errors in routines which define only some of the other methods
\r
13 * of the interface (and defer to the superclass on others).
\r
14 * In that case there is an ambiguity as to whether to
\r
15 * call the routine in the current class but convert to
\r
16 * Object, or call the method from the super class with
\r
17 * the same type argument.
\r
18 * @param o The primitive or String array to be written.
\r
19 * @throws IOException if the argument is not of the proper type
\r
21 public void writeArray(Object o) throws IOException;
\r
23 /* Write a complete array */
\r
24 public void write(byte[] buf) throws IOException;
\r
26 public void write(boolean[] buf) throws IOException;
\r
28 public void write(short[] buf) throws IOException;
\r
30 public void write(char[] buf) throws IOException;
\r
32 public void write(int[] buf) throws IOException;
\r
34 public void write(long[] buf) throws IOException;
\r
36 public void write(float[] buf) throws IOException;
\r
38 public void write(double[] buf) throws IOException;
\r
40 /* Write an array of Strings */
\r
41 public void write(String[] buf) throws IOException;
\r
43 /* Write a segment of a primitive array. */
\r
44 public void write(byte[] buf, int offset, int size) throws IOException;
\r
46 public void write(boolean[] buf, int offset, int size) throws IOException;
\r
48 public void write(char[] buf, int offset, int size) throws IOException;
\r
50 public void write(short[] buf, int offset, int size) throws IOException;
\r
52 public void write(int[] buf, int offset, int size) throws IOException;
\r
54 public void write(long[] buf, int offset, int size) throws IOException;
\r
56 public void write(float[] buf, int offset, int size) throws IOException;
\r
58 public void write(double[] buf, int offset, int size) throws IOException;
\r
60 /* Write some of an array of Strings */
\r
61 public void write(String[] buf, int offset, int size) throws IOException;
\r
63 /* Flush the output buffer */
\r
64 public void flush() throws IOException;
\r
66 public void close() throws IOException;
\r