Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface ImageInputStream
extends DataInput
ImageReaders
.
Method Summary | |
void |
|
void |
|
void |
|
int | |
ByteOrder | |
long | |
long | |
boolean |
|
boolean | |
boolean | |
long |
|
void |
|
int |
|
int |
|
int |
|
int |
|
long |
|
boolean |
|
byte |
|
void |
|
char |
|
double |
|
float |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
int |
|
String |
|
long |
|
short |
|
String |
|
int |
|
long |
|
int |
|
void |
|
void |
|
void |
|
void |
|
int |
|
long |
|
Methods inherited from interface java.io.DataInput | |
readBoolean , readByte , readChar , readDouble , readFloat , readFully , readFully , readInt , readLine , readLong , readShort , readUTF , readUnsignedByte , readUnsignedShort , skipBytes |
public boolean readBoolean() throws IOException
Reads a byte and checks whether or not its value is zero.The bit offset is set to zero before the byte is read.
- Specified by:
- readBoolean in interface DataInput
- Throws:
IOException
- if some general problem happens with accessing data.
- See Also:
readBit()
,readByte()
,readFully(byte[],int,int)
public byte readByte() throws IOException
Reads a signed byte.The bit offset is set to zero before any data is read.
- Throws:
IOException
- if some general problem happens with accessing data.
- See Also:
readUnsignedByte()
,readFully(byte[],int,int)
public void readBytes(IIOByteBuffer buf, int numBytes) throws IOException
Reads up to a specified number of bytes, and modifies aIIOByteBuffer
to hold the read data.The bit offset is set to zero before any data is read.
- Parameters:
buf
- anIIOByteBuffer
that will hold the read data.numBytes
- the maximum number of bytes to read.
- Throws:
IndexOutOfBoundsException
- ifnumBytes
is negative.NullPointerException
- ifbuf
isnull
.IOException
- if some general problem happens with accessing data.
public char readChar() throws IOException
Reads an unsigned 16-bit integer. If necessary, the value gets converted from the stream’s current byte order.The bit offset is set to zero before any data is read.
This method does the same as
readUnsignedShort()
.
- Throws:
IOException
- if some general problem happens with accessing data.
- See Also:
readFully(char[],int,int)
public double readDouble() throws IOException
Reads an IEEE 64-bit double-precision floating point number. If necessary, the value gets converted from the stream’s current byte order.The bit offset is set to zero before any data is read.
- Specified by:
- readDouble in interface DataInput
- Throws:
IOException
- if some general problem happens with accessing data.
- See Also:
readFully(double[],int,int)
public float readFloat() throws IOException
Reads an IEEE 32-bit single-precision floating point number. If necessary, the value gets converted from the stream’s current byte order.The bit offset is set to zero before any data is read.
- Throws:
IOException
- if some general problem happens with accessing data.
- See Also:
readFully(float[],int,int)
public void readFully(byte[] b) throws IOException
Reads a sequence of signed 8-bit integers into abyte[]
array.The bit offset is set to zero before any data is read.
- Parameters:
b
- an array for storing the read values.
- Throws:
NullPointerException
- ifb
isnull
.IOException
- if some general problem happens with accessing data.
- See Also:
readByte()
,readFully(byte[],int,int)
public void readFully(byte[] b, int offset, int numBytes) throws IOException
Reads a sequence of signed 8-bit integers into abyte[]
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 inb
that will hold read data.numBytes
- the number of bytes to read.
- Throws:
IndexOutOfBoundsException
- ifoffset
ornumBytes
is negative, or ifoffset + numBytes
exceedsb.length
.NullPointerException
- ifb
isnull
.IOException
- if some general problem happens with accessing data.
- See Also:
readByte()
public void readFully(char[] c, int offset, int numChars) throws IOException
Reads a sequence of unsigned 16-bit integers into achar[]
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 inc
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
- ifoffset
ornumChars
is negative, or ifoffset + numChars
exceedsc.length
.NullPointerException
- ifc
isnull
.IOException
- if some general problem happens with accessing data.
- See Also:
readChar()
public void readFully(double[] d, int offset, int numDoubles) throws IOException
Reads a sequence of IEEE 64-bit double-precision floating point numbers into adouble[]
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 ind
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
- ifoffset
ornumDoubles
is negative, or ifoffset + numDoubles
exceedsd.length
.NullPointerException
- ifd
isnull
.IOException
- if some general problem happens with accessing data.
- See Also:
readDouble()
public void readFully(float[] f, int offset, int numFloats) throws IOException
Reads a sequence of IEEE 32-bit single-precision floating point numbers into afloat[]
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:
offset
- the index of the first element ind
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
- ifoffset
ornumFloats
is negative, or ifoffset + numFloats
exceedsf.length
.NullPointerException
- iff
isnull
.IOException
- if some general problem happens with accessing data.
- See Also:
readFloat()
public void readFully(int[] i, int offset, int numInts) throws IOException
Reads a sequence of signed 32-bit integers into along[]
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 ini
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
- ifoffset
ornumInts
is negative, or ifoffset + numInts
exceedsi.length
.NullPointerException
- ifi
isnull
.IOException
- if some general problem happens with accessing data.
- See Also:
readInt()
public void readFully(long[] l, int offset, int numLongs) throws IOException
Reads a sequence of signed 64-bit integers into along[]
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 inl
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
- ifoffset
ornumLongs
is negative, or ifoffset + numLongs
exceedsl.length
.NullPointerException
- ifl
isnull
.IOException
- if some general problem happens with accessing data.
- See Also:
readLong()
public void readFully(short[] s, int offset, int numShorts) throws IOException
Reads a sequence of signed 16-bit integers into ashort[]
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 ins
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
- ifoffset
ornumShorts
is negative, or ifoffset + numShorts
exceedss.length
.NullPointerException
- ifs
isnull
.IOException
- if some general problem happens with accessing data.
- See Also:
readShort()
public int readInt() throws IOException
Reads a signed 32-bit integer. If necessary, the value gets converted from the stream’s current byte order.The bit offset is set to zero before any data is read.
- Throws:
IOException
- if some general problem happens with accessing data.
- See Also:
readUnsignedInt()
,readFully(int[],int,int)
public long readLong() throws IOException
Reads a signed 64-bit integer. If necessary, the value gets converted from the stream’s current byte order.The bit offset is set to zero before any data is read.
- Throws:
IOException
- if some general problem happens with accessing data.
- See Also:
readFully(long[],int,int)
public short readShort() throws IOException
Reads an signed 16-bit integer. If necessary, the value gets converted from the stream’s current byte order.The bit offset is set to zero before any data is read.
- Throws:
IOException
- if some general problem happens with accessing data.
public int readUnsignedByte() throws IOException
Reads an unsigned byte.The bit offset is set to zero before any data is read.
- Specified by:
- readUnsignedByte in interface DataInput
- Throws:
IOException
- if some general problem happens with accessing data.
- See Also:
readByte()
,readFully(byte[],int,int)
public long readUnsignedInt() throws IOException
Reads an unsigned 32-bit integer. If necessary, the value gets converted from the stream’s current byte order.The bit offset is set to zero before any data is read.
- Throws:
IOException
- if some general problem happens with accessing data.
- See Also:
readInt()
,readFully(int[],int,int)
public int readUnsignedShort() throws IOException
Reads an unsigned 16-bit integer. If necessary, the value gets converted from the stream’s current byte order.The bit offset is set to zero before any data is read.
This method does the same as
readChar()
.
- Specified by:
- readUnsignedShort in interface DataInput
- Throws:
IOException
- if some general problem happens with accessing data.
- See Also:
readShort()
,readChar()
,readFully(char[],int,int)