Begin versioning.
[fits.git] / src / nom / tam / util / ArrayDataInput.java
1 package nom.tam.util;\r
2 \r
3 import java.io.IOException;\r
4 \r
5 public interface ArrayDataInput extends java.io.DataInput {\r
6 \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
10      * <p>\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
15      */\r
16     public int readArray(Object o) throws IOException;\r
17 \r
18     /** Read an array. This version works even if the\r
19      * underlying data is more than 2 Gigabytes.\r
20      */\r
21     public long readLArray(Object o) throws IOException;\r
22 \r
23     /* Read a complete primitive array */\r
24     public int read(byte[] buf) throws IOException;\r
25 \r
26     public int read(boolean[] buf) throws IOException;\r
27 \r
28     public int read(short[] buf) throws IOException;\r
29 \r
30     public int read(char[] buf) throws IOException;\r
31 \r
32     public int read(int[] buf) throws IOException;\r
33 \r
34     public int read(long[] buf) throws IOException;\r
35 \r
36     public int read(float[] buf) throws IOException;\r
37 \r
38     public int read(double[] buf) throws IOException;\r
39 \r
40     /* Read a segment of a primitive array. */\r
41     public int read(byte[] buf, int offset, int size) throws IOException;\r
42 \r
43     public int read(boolean[] buf, int offset, int size) throws IOException;\r
44 \r
45     public int read(char[] buf, int offset, int size) throws IOException;\r
46 \r
47     public int read(short[] buf, int offset, int size) throws IOException;\r
48 \r
49     public int read(int[] buf, int offset, int size) throws IOException;\r
50 \r
51     public int read(long[] buf, int offset, int size) throws IOException;\r
52 \r
53     public int read(float[] buf, int offset, int size) throws IOException;\r
54 \r
55     public int read(double[] buf, int offset, int size) throws IOException;\r
56 \r
57     /* Skip (forward) in a file */\r
58     public long skip(long distance) throws IOException;\r
59 \r
60     /* Skip and require that the data be there. */\r
61     public long skipBytes(long toSkip) throws IOException;\r
62 \r
63     /* Close the file. */\r
64     public void close() throws IOException;\r
65 }\r