All Implemented Interfaces:
Closeable, DataInput
All Known Implementing Classes:
MemoryCacheImageOutputStream, FileImageInputStream, MemoryCacheImageInputStream, FileCacheImageInputStream, ImageOutputStreamImpl, FileCacheImageOutputStream, ImageOutputStream, ImageInputStreamImpl, FileImageOutputStream
ImageReader
s. Various input sources, such as
InputStream
s and File
s,
as well as future fast I/O sources may be "wrapped" by a suitable
implementation of this interface for use by the Image I/O API.Method from javax.imageio.stream.ImageInputStream Summary: |
---|
close, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, length, mark, read, read, read, readBit, readBits, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readInt, readLine, readLong, readShort, readUTF, readUnsignedByte, readUnsignedInt, readUnsignedShort, reset, seek, setBitOffset, setByteOrder, skipBytes, skipBytes |
Method from javax.imageio.stream.ImageInputStream Detail: |
---|
IOException s or incorrect
behavior. Calling this method may allow classes implementing
this interface to release resources associated with the stream
such as memory, disk space, or file descriptors. |
flushBefore(getStreamPosition()) . |
IndexOutOfBoundsException .
Calling |
readBits method. A value of 0 indicates the
most-significant bit, and a value of 7 indicates the least
significant bit, of the byte being read.
The bit offset is set to 0 when a stream is first
opened, and is reset to 0 by calls to |
java.nio.ByteOrder enumeration. |
flushBefore . |
|
true if this ImageInputStream
caches data itself in order to allow seeking backwards.
Applications may consult this in order to decide how frequently,
or whether, to flush in order to conserve cache resources. |
true if this ImageInputStream
caches data itself in order to allow seeking backwards, and
the cache is kept in a temporary file. Applications may consult
this in order to decide how frequently, or whether, to flush
in order to conserve cache resources. |
true if this ImageInputStream
caches data itself in order to allow seeking backwards, and
the cache is kept in main memory. Applications may consult
this in order to decide how frequently, or whether, to flush
in order to conserve cache resources. |
-1 is returned. |
reset . Unlike a standard
InputStream , all ImageInputStream s
support marking. Additionally, calls to mark and
reset may be nested arbitrarily.
Unlike the The bit position used by the Note that it is valid for an |
The bit offset within the stream is reset to zero before the read occurs. |
b.length bytes from the stream, and
stores them into b starting at index 0. The
number of bytes read is returned. If no bytes can be read
because the end of the stream has been reached, -1 is returned.
The bit offset within the stream is reset to zero before the read occurs. |
len bytes from the stream, and stores
them into b starting at index off .
The number of bytes read is returned. If no bytes can be read
because the end of the stream has been reached, -1
is returned.
The bit offset within the stream is reset to zero before the read occurs. |
int with the value 0 or
1 . The bit offset is advanced by one and reduced
modulo 8. |
long , with the first bit read becoming the most
significant bit of the output. The read starts within the byte
indicated by getStreamPosition , at the bit given
by getBitOffset . The bit offset is advanced by
numBits and reduced modulo 8.
The byte order of the stream has no effect on this method. The return value of this method is constructed as though the bits were read one at a time, and shifted into the right side of the return value, as shown by the following pseudo-code: long accum = 0L; for (int i = 0; i < numBits; i++) { accum <<= 1; // Shift left one bit to make room accum |= readBit(); }Note that the result of readBits(32) may thus not
be equal to that of readInt() if a reverse network
byte order is being used (i.e., getByteOrder() ==
false ).
If the end of the stream is encountered before all the bits
have been read, an |
boolean
value of true if it is nonzero, false
if it is zero.
The bit offset within the stream is reset to zero before the read occurs. |
byte value. Byte values between 0x00
and 0x7f represent integer values between
0 and 127 . Values between
0x80 and 0xff represent negative
values from -128 to /1 .
The bit offset within the stream is reset to zero before the read occurs. |
len bytes from the stream, and
modifies the supplied IIOByteBuffer to indicate
the byte array, offset, and length where the data may be found.
The caller should not attempt to modify the data found in the
IIOByteBuffer .
The bit offset within the stream is reset to zero before the read occurs. |
readUnsignedShort , except that the
result is returned using the char datatype.
The bit offset within the stream is reset to zero before the read occurs. |
double .
The bit offset within the stream is reset to zero before the read occurs. |
float .
The bit offset within the stream is reset to zero before the read occurs. |
b.length bytes from the stream, and stores them
into b starting at index 0 .
If the end of the stream is reached, an EOFException
will be thrown.
The bit offset within the stream is reset to zero before the read occurs. |
len bytes from the stream, and stores them
into b starting at index off .
If the end of the stream is reached, an EOFException
will be thrown.
The bit offset within the stream is reset to zero before the read occurs. |
len shorts (signed 16-bit integers) from the
stream according to the current byte order, and
stores them into s starting at index
off . If the end of the stream is reached, an
EOFException will be thrown.
The bit offset within the stream is reset to zero before the read occurs. |
len chars (unsigned 16-bit integers) from the
stream according to the current byte order, and
stores them into c starting at index
off . If the end of the stream is reached, an
EOFException will be thrown.
The bit offset within the stream is reset to zero before the read occurs. |
len ints (signed 32-bit integers) from the
stream according to the current byte order, and
stores them into i starting at index
off . If the end of the stream is reached, an
EOFException will be thrown.
The bit offset within the stream is reset to zero before the read occurs. |
len longs (signed 64-bit integers) from the
stream according to the current byte order, and
stores them into l starting at index
off . If the end of the stream is reached, an
EOFException will be thrown.
The bit offset within the stream is reset to zero before the read occurs. |
len floats (32-bit IEEE single-precision
floats) from the stream according to the current byte order,
and stores them into f starting at
index off . If the end of the stream is reached,
an EOFException will be thrown.
The bit offset within the stream is reset to zero before the read occurs. |
len doubles (64-bit IEEE double-precision
floats) from the stream according to the current byte order,
and stores them into d starting at
index off . If the end of the stream is reached,
an EOFException will be thrown.
The bit offset within the stream is reset to zero before the read occurs. |
int .
The bit offset within the stream is ignored and treated as though it were zero. |
String . Note that because this method processes
bytes, it does not support input of the full Unicode character
set.
If end of file is encountered before even one byte can be
read, then The bit offset within the stream is reset to zero before the read occurs. |
long .
The bit offset within the stream is reset to zero before the read occurs. |
short value.
The bit offset within the stream is reset to zero before the read occurs. |
readUTF is that
it reads a representation of a Unicode character string encoded
in modified UTF-8 format; this string of characters is
then returned as a String .
First, two bytes are read and used to construct an unsigned
16-bit integer in the manner of the
If the first byte of a group matches the bit pattern
If the first byte of a group matches the bit pattern
If the first byte of a group matches the bit pattern
1110xxxx , then the group consists of that byte
a and two more bytes b and
c . If there is no byte c (because
byte a was one of the last two of the bytes to be
read), or either byte b or byte c
does not match the bit pattern 10xxxxxx , then a
UTFDataFormatException is thrown. Otherwise, the
group is converted to the character:
If the first byte of a group matches the pattern
1111xxxx or the pattern 10xxxxxx ,
then a UTFDataFormatException is thrown.
If end of file is encountered at any time during this
entire process, then an After every group has been converted to a character by this
process, the characters are gathered, in the same order in
which their corresponding groups were read from the input
stream, to form a The current byte order setting is ignored. The bit offset within the stream is reset to zero before the read occurs. Note: This method should not be used in the implementation of image formats that use standard UTF-8, because the modified UTF-8 used here is incompatible with standard UTF-8. |
0xff in order to strip off
any sign-extension bits, and returns it as a byte
value.
Thus, byte values between The bit offset within the stream is reset to zero before the read occurs. |
0xffffffffL in order to
strip off any sign-extension bits, and returns the result as an
unsigned long value.
The bit offset within the stream is reset to zero before the read occurs. |
int , masks it with
0xffff in order to strip off any sign-extension
buts, and returns the result as an unsigned int
value.
The bit offset within the stream is reset to zero before the read occurs. |
mark .
Calls to An |
An It is legal to seek past the end of the file; an
|
getStreamPosition , is left unchanged.
A value of 0 indicates the
most-significant bit, and a value of 7 indicates the least
significant bit, of the byte being read. |
The enumeration class The byte order has no effect on the results returned from
the |
|
skipBytes(int) except
that it allows for a larger skip distance. |