public interface ArrayDataInput extends java.io.DataInput, 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
Modifier and Type | Method and Description |
---|---|
void |
mark(int readlimit)
See the general contract of the
mark method of
InputStream . |
int |
read(boolean[] buf)
Read an array of boolean's.
|
int |
read(boolean[] buf,
int offset,
int size)
Read a segment of an array of boolean's.
|
int |
read(byte[] buf)
Read an array of byte's.
|
int |
read(byte[] buf,
int offset,
int size)
Read a segment of an array of byte's.
|
int |
read(char[] buf)
Read an array of char's.
|
int |
read(char[] buf,
int offset,
int size)
Read a segment of an array of char's.
|
int |
read(double[] buf)
Read an array of double's.
|
int |
read(double[] buf,
int offset,
int size)
Read a segment of an array of double's.
|
int |
read(float[] buf)
Read an array of float's.
|
int |
read(float[] buf,
int offset,
int size)
Read a segment of an array of float's.
|
int |
read(int[] buf)
Read an array of int's.
|
int |
read(int[] buf,
int offset,
int size)
Read a segment of an array of int's.
|
int |
read(long[] buf)
Read a segment of an array of long's.
|
int |
read(long[] buf,
int offset,
int size)
Read a segment of an array of long's.
|
int |
read(short[] buf)
Read an array of short's.
|
int |
read(short[] buf,
int offset,
int size)
Read a segment of an array of short's.
|
int |
readArray(java.lang.Object o)
Deprecated.
use
readLArray(Object) instead. |
void |
readFully(byte[] b,
int off,
int len)
Read a buffer and signal an EOF if the requested elements cannot be read.
|
long |
readLArray(java.lang.Object o)
Read an object.
|
void |
reset()
See the general contract of the
reset method of
InputStream . |
long |
skip(long distance)
Skip the number of bytes.
|
void |
skipAllBytes(int toSkip)
Skip the number of bytes.
|
void |
skipAllBytes(long toSkip)
Skip the number of bytes.
|
void mark(int readlimit) throws java.io.IOException
mark
method of
InputStream
.readlimit
- the maximum limit of bytes that can be read before the mark
position becomes invalid.java.io.IOException
- if the operation failedBufferedInputStream.reset()
int read(byte[] buf) throws java.io.IOException
buf
- array of byte's.java.io.IOException
- if one of the underlying read operations failedDataInput.readFully(byte[])
int read(byte[] buf, int offset, int size) throws java.io.IOException
buf
- array of byte's.offset
- start index in the arraysize
- number of array elements to readjava.io.IOException
- if one of the underlying read operations failedreadFully(byte[], int, int)
int read(boolean[] buf) throws java.io.IOException
buf
- array of boolean's.java.io.IOException
- if one of the underlying read operations failedint read(boolean[] buf, int offset, int size) throws java.io.IOException
buf
- array of boolean's.offset
- start index in the arraysize
- number of array elements to readjava.io.IOException
- if one of the underlying read operations failedint read(char[] buf) throws java.io.IOException
buf
- array of char's.java.io.IOException
- if one of the underlying read operations failedint read(char[] buf, int offset, int size) throws java.io.IOException
buf
- array of char's.offset
- start index in the arraysize
- number of array elements to readjava.io.IOException
- if one of the underlying read operations failedint read(double[] buf) throws java.io.IOException
buf
- array of double's.java.io.IOException
- if one of the underlying read operations failedint read(double[] buf, int offset, int size) throws java.io.IOException
buf
- array of double's.offset
- start index in the arraysize
- number of array elements to readjava.io.IOException
- if one of the underlying read operations failedint read(float[] buf) throws java.io.IOException
buf
- array of float's.java.io.IOException
- if one of the underlying read operations failedint read(float[] buf, int offset, int size) throws java.io.IOException
buf
- array of float's.offset
- start index in the arraysize
- number of array elements to readjava.io.IOException
- if one of the underlying read operations failedint read(int[] buf) throws java.io.IOException
buf
- array of int's.java.io.IOException
- if one of the underlying read operations failedint read(int[] buf, int offset, int size) throws java.io.IOException
buf
- array of int's.offset
- start index in the arraysize
- number of array elements to readjava.io.IOException
- if one of the underlying read operations failedint read(long[] buf) throws java.io.IOException
buf
- array of long's.java.io.IOException
- if one of the underlying read operations failedint read(long[] buf, int offset, int size) throws java.io.IOException
buf
- array of long's.offset
- start index in the arraysize
- number of array elements to readjava.io.IOException
- if one of the underlying read operations failedint read(short[] buf) throws java.io.IOException
buf
- array of short's.java.io.IOException
- if one of the underlying read operations failedint read(short[] buf, int offset, int size) throws java.io.IOException
buf
- array of short's.offset
- start index in the arraysize
- number of array elements to readjava.io.IOException
- if one of the underlying read operations failed@Deprecated int readArray(java.lang.Object o) throws java.io.IOException
readLArray(Object)
instead.The ArrayDataInput classes do not support String input since it is unclear how one would read in an Array of strings.
o
- A [multidimensional] primitive (or Object) array.java.io.IOException
- if the underlying stream failedlong readLArray(java.lang.Object o) throws java.io.IOException
o
- The object to be read. This object should be a primitive
(possibly multi-dimensional) array.java.io.IOException
- if the underlying stream failedvoid reset() throws java.io.IOException
reset
method of
InputStream
.
If markpos
is -1
(no mark has been set or the
mark has been invalidated), an IOException
is thrown.
Otherwise, pos
is set equal to markpos
.
java.io.IOException
- if this stream has not been marked or, if the mark has
been invalidated, or the stream has been closed by
invoking its FitsIO.close()
method, or an I/O error
occurs.BufferedInputStream.mark(int)
long skip(long distance) throws java.io.IOException
distance
- the number of bytes to skipjava.io.IOException
- if the underlying stream failedvoid skipAllBytes(long toSkip) throws java.io.IOException
toSkip
- the number of bytes to skipjava.io.IOException
- if the underlying stream failedvoid skipAllBytes(int toSkip) throws java.io.IOException
toSkip
- the number of bytes to skipjava.io.IOException
- if the underlying stream failedvoid readFully(byte[] b, int off, int len) throws java.io.IOException
readFully
in interface java.io.DataInput
b
- The input buffer.off
- The requested offset into the buffer.len
- The number of bytes requested.java.io.IOException