1 package nom.tam.util;
\r
3 import java.io.IOException;
\r
5 public interface ArrayDataInput extends java.io.DataInput {
\r
7 /** Read a generic (possibly multidimenionsional) primitive array.
\r
8 * An Object[] array is also a legal argument if each element
\r
9 * of the array is a legal.
\r
11 * The ArrayDataInput classes do not support String input since
\r
12 * it is unclear how one would read in an Array of strings.
\r
13 * @param o A [multidimensional] primitive (or Object) array.
\r
14 * @deprecated See readLArray(Object o).
\r
16 public int readArray(Object o) throws IOException;
\r
18 /** Read an array. This version works even if the
\r
19 * underlying data is more than 2 Gigabytes.
\r
21 public long readLArray(Object o) throws IOException;
\r
23 /* Read a complete primitive array */
\r
24 public int read(byte[] buf) throws IOException;
\r
26 public int read(boolean[] buf) throws IOException;
\r
28 public int read(short[] buf) throws IOException;
\r
30 public int read(char[] buf) throws IOException;
\r
32 public int read(int[] buf) throws IOException;
\r
34 public int read(long[] buf) throws IOException;
\r
36 public int read(float[] buf) throws IOException;
\r
38 public int read(double[] buf) throws IOException;
\r
40 /* Read a segment of a primitive array. */
\r
41 public int read(byte[] buf, int offset, int size) throws IOException;
\r
43 public int read(boolean[] buf, int offset, int size) throws IOException;
\r
45 public int read(char[] buf, int offset, int size) throws IOException;
\r
47 public int read(short[] buf, int offset, int size) throws IOException;
\r
49 public int read(int[] buf, int offset, int size) throws IOException;
\r
51 public int read(long[] buf, int offset, int size) throws IOException;
\r
53 public int read(float[] buf, int offset, int size) throws IOException;
\r
55 public int read(double[] buf, int offset, int size) throws IOException;
\r
57 /* Skip (forward) in a file */
\r
58 public long skip(long distance) throws IOException;
\r
60 /* Skip and require that the data be there. */
\r
61 public long skipBytes(long toSkip) throws IOException;
\r
63 /* Close the file. */
\r
64 public void close() throws IOException;
\r