javax.imageio.stream
public interface ImageInputStream extends DataInput
javax.imageio.ImageReader
ImageReaders.
Since: 1.4
| Method Summary | |
|---|---|
| void | close() |
| void | flush() |
| void | flushBefore(long pos) |
| int | getBitOffset() |
| ByteOrder | getByteOrder() |
| long | getFlushedPosition() |
| long | getStreamPosition() |
| boolean | isCached() |
| boolean | isCachedFile() |
| boolean | isCachedMemory() |
| long | length() |
| void | mark() |
| int | read() |
| int | read(byte[] b) |
| int | read(byte[] b, int offset, int length) |
| int | readBit() |
| long | readBits(int numBits) |
| boolean | readBoolean()
Reads a byte and checks whether or not its value is zero.
|
| byte | readByte()
Reads a signed byte.
|
| void | readBytes(IIOByteBuffer buf, int numBytes)
Reads up to a specified number of bytes, and modifies a
IIOByteBuffer to hold the read data.
|
| char | readChar()
Reads an unsigned 16-bit integer. |
| double | readDouble()
Reads an IEEE 64-bit double-precision floating point number. |
| float | readFloat()
Reads an IEEE 32-bit single-precision floating point number. |
| void | readFully(byte[] b, int offset, int numBytes)
Reads a sequence of signed 8-bit integers into a
byte[] array.
|
| void | readFully(byte[] b)
Reads a sequence of signed 8-bit integers into a
byte[] array.
|
| void | readFully(short[] s, int offset, int numShorts)
Reads a sequence of signed 16-bit integers into a
short[] array. |
| void | readFully(char[] c, int offset, int numChars)
Reads a sequence of unsigned 16-bit integers into a
char[] array. |
| void | readFully(int[] i, int offset, int numInts)
Reads a sequence of signed 32-bit integers into a
long[] array. |
| void | readFully(long[] l, int offset, int numLongs)
Reads a sequence of signed 64-bit integers into a
long[] array. |
| void | readFully(float[] f, int offset, int numFloats)
Reads a sequence of IEEE 32-bit single-precision floating point
numbers into a float[] array. |
| void | readFully(double[] d, int offset, int numDoubles)
Reads a sequence of IEEE 64-bit double-precision floating point
numbers into a double[] array. |
| int | readInt()
Reads a signed 32-bit integer. |
| String | readLine() |
| long | readLong()
Reads a signed 64-bit integer. |
| short | readShort()
Reads an signed 16-bit integer. |
| int | readUnsignedByte()
Reads an unsigned byte.
|
| long | readUnsignedInt()
Reads an unsigned 32-bit integer. |
| int | readUnsignedShort()
Reads an unsigned 16-bit integer. |
| String | readUTF() |
| void | reset() |
| void | seek(long pos) |
| void | setBitOffset(int bitOffset) |
| void | setByteOrder(ByteOrder order) |
| int | skipBytes(int numBytes) |
| long | skipBytes(long numBytes) |
The bit offset is set to zero before the byte is read.
Throws: EOFException if the input stream is at its end. IOException if some general problem happens with accessing data.
See Also: readBit readByte (byte[], int, int)
The bit offset is set to zero before any data is read.
Throws: EOFException if the input stream is at its end. IOException if some general problem happens with accessing data.
See Also: readUnsignedByte (byte[], int, int)
The bit offset is set to zero before any data is read.
Parameters: buf an IIOByteBuffer that will hold the read
data.
numBytes the maximum number of bytes to read.
Throws: IndexOutOfBoundsException if numBytes is
negative.
NullPointerException if buf is
null.
IOException if some general problem happens with
accessing data.
The bit offset is set to zero before any data is read.
This method does the same as readUnsignedShort.
Throws: EOFException if the input stream ends before all two bytes were read. IOException if some general problem happens with accessing data.
See Also: (char[], int, int)
The bit offset is set to zero before any data is read.
Throws: EOFException if the input stream ends before all eight bytes were read. IOException if some general problem happens with accessing data.
See Also: (double[], int, int)
The bit offset is set to zero before any data is read.
Throws: EOFException if the input stream ends before all four bytes were read. IOException if some general problem happens with accessing data.
See Also: (float[], int, int)
byte[] array.
The bit offset is set to zero before any data is read.
Parameters: b an array for storing the read values.
offset the index of the first element in b
that will hold read data.
numBytes the number of bytes to read.
Throws: IndexOutOfBoundsException if offset or
numBytes is negative, or if offset +
numBytes exceeds b.length.
NullPointerException if b is
null.
EOFException if the input stream ends before all content
was read.
IOException if some general problem happens with
accessing data.
See Also: readByte
byte[] array.
The bit offset is set to zero before any data is read.
Parameters: b an array for storing the read values.
Throws: NullPointerException if b is
null.
EOFException if the input stream ends before all content
was read.
IOException if some general problem happens with
accessing data.
See Also: readByte (byte[], int, int)
short[] array. If necessary, values are converted
from the stream’s current byte
order.
The bit offset is set to zero before any data is read.
Parameters: s an array for storing the read values.
offset the index of the first element in s
that will hold read data.
numShorts the number of signed 16-bit integers to read
(which is one half of the number of bytes).
Throws: IndexOutOfBoundsException if offset or
numShorts is negative, or if offset +
numShorts exceeds s.length.
NullPointerException if s is
null.
EOFException if the input stream ends before all content
was read.
IOException if some general problem happens with
accessing data.
See Also: readShort
char[] array. If necessary, values are converted
from the stream’s current byte
order.
The bit offset is set to zero before any data is read.
Parameters: c an array for storing the read values.
offset the index of the first element in c
that will hold read data.
numChars the number of unsigned 16-bit integers to read
(which is one half of the number of bytes).
Throws: IndexOutOfBoundsException if offset or
numChars is negative, or if offset +
numChars exceeds c.length.
NullPointerException if c is
null.
EOFException if the input stream ends before all content
was read.
IOException if some general problem happens with
accessing data.
See Also: readChar
long[] array. If necessary, values are converted
from the stream’s current byte
order.
The bit offset is set to zero before any data is read.
Parameters: i an array for storing the read values.
offset the index of the first element in i
that will hold read data.
numInts the number of signed 32-bit integers to read
(which is one fourth of the number of bytes).
Throws: IndexOutOfBoundsException if offset or
numInts is negative, or if offset +
numInts exceeds i.length.
NullPointerException if i is
null.
EOFException if the input stream ends before all content
was read.
IOException if some general problem happens with
accessing data.
See Also: readInt
long[] array. If necessary, values are converted
from the stream’s current byte
order.
The bit offset is set to zero before any data is read.
Parameters: l an array for storing the read values.
offset the index of the first element in l
that will hold read data.
numLongs the number of signed 64-bit integers to read
(which is one eight of the number of bytes).
Throws: IndexOutOfBoundsException if offset or
numLongs is negative, or if offset +
numLongs exceeds l.length.
NullPointerException if l is
null.
EOFException if the input stream ends before all content
was read.
IOException if some general problem happens with
accessing data.
See Also: readLong
float[] array. If necessary, values
are converted from the stream’s current byte order.
The bit offset is set to zero before any data is read.
Parameters: d an array for storing the read values.
offset the index of the first element in d
that will hold read data.
numFloats the number of IEEE 32-bit single-precision
floating point numbers to read (which is one fourth of the number
of bytes).
Throws: IndexOutOfBoundsException if offset or
numFloats is negative, or if offset +
numFloats exceeds f.length.
NullPointerException if f is
null.
EOFException if the input stream ends before all content
was read.
IOException if some general problem happens with
accessing data.
See Also: readFloat
double[] array. If necessary, values
are converted from the stream’s current byte order.
The bit offset is set to zero before any data is read.
Parameters: d an array for storing the read values.
offset the index of the first element in d
that will hold read data.
numDoubles the number of IEEE 64-bit double-precision
floating point numbers to read (which is one eight of the number
of bytes).
Throws: IndexOutOfBoundsException if offset or
numDoubles is negative, or if offset +
numDoubles exceeds d.length.
NullPointerException if d is
null.
EOFException if the input stream ends before all content
was read.
IOException if some general problem happens with
accessing data.
See Also: readDouble
The bit offset is set to zero before any data is read.
Throws: EOFException if the input stream ends before all four bytes were read. IOException if some general problem happens with accessing data.
See Also: readUnsignedInt (int[], int, int)
The bit offset is set to zero before any data is read.
Throws: EOFException if the input stream ends before all eight bytes were read. IOException if some general problem happens with accessing data.
See Also: (long[], int, int)
The bit offset is set to zero before any data is read.
Throws: EOFException if the input stream ends before all two bytes were read. IOException if some general problem happens with accessing data.
See Also: readUnsignedShort readChar (short[], int, int)
The bit offset is set to zero before any data is read.
Throws: EOFException if the input stream is at its end. IOException if some general problem happens with accessing data.
See Also: readByte (byte[], int, int)
The bit offset is set to zero before any data is read.
Throws: EOFException if the input stream ends before all four bytes were read. IOException if some general problem happens with accessing data.
See Also: readInt (int[], int, int)
The bit offset is set to zero before any data is read.
This method does the same as readChar.
Throws: EOFException if the input stream ends before all two bytes were read. IOException if some general problem happens with accessing data.
See Also: readShort readChar (char[], int, int)