ImageInputStreamImpl (Java Platform SE 7 ) (original) (raw)
Modifier and Type
Method and Description
protected void
**[checkClosed](../../../javax/imageio/stream/ImageInputStreamImpl.html#checkClosed%28%29)**()
Throws an IOException
if the stream has been closed.
void
**[close](../../../javax/imageio/stream/ImageInputStreamImpl.html#close%28%29)**()
Closes the stream.
protected void
**[finalize](../../../javax/imageio/stream/ImageInputStreamImpl.html#finalize%28%29)**()
Finalizes this object prior to garbage collection.
void
**[flush](../../../javax/imageio/stream/ImageInputStreamImpl.html#flush%28%29)**()
Discards the initial position of the stream prior to the current stream position.
void
**[flushBefore](../../../javax/imageio/stream/ImageInputStreamImpl.html#flushBefore%28long%29)**(long pos)
Discards the initial portion of the stream prior to the indicated postion.
int
**[getBitOffset](../../../javax/imageio/stream/ImageInputStreamImpl.html#getBitOffset%28%29)**()
Returns the current bit offset, as an integer between 0 and 7, inclusive.
[ByteOrder](../../../java/nio/ByteOrder.html "class in java.nio")
**[getByteOrder](../../../javax/imageio/stream/ImageInputStreamImpl.html#getByteOrder%28%29)**()
Returns the byte order with which data values will be read from this stream as an instance of thejava.nio.ByteOrder
enumeration.
long
**[getFlushedPosition](../../../javax/imageio/stream/ImageInputStreamImpl.html#getFlushedPosition%28%29)**()
Returns the earliest position in the stream to which seeking may be performed.
long
**[getStreamPosition](../../../javax/imageio/stream/ImageInputStreamImpl.html#getStreamPosition%28%29)**()
Returns the current byte position of the stream.
boolean
**[isCached](../../../javax/imageio/stream/ImageInputStreamImpl.html#isCached%28%29)**()
Default implementation returns false.
boolean
**[isCachedFile](../../../javax/imageio/stream/ImageInputStreamImpl.html#isCachedFile%28%29)**()
Default implementation returns false.
boolean
**[isCachedMemory](../../../javax/imageio/stream/ImageInputStreamImpl.html#isCachedMemory%28%29)**()
Default implementation returns false.
long
**[length](../../../javax/imageio/stream/ImageInputStreamImpl.html#length%28%29)**()
Returns -1L
to indicate that the stream has unknown length.
void
**[mark](../../../javax/imageio/stream/ImageInputStreamImpl.html#mark%28%29)**()
Pushes the current stream position onto a stack of marked positions.
abstract int
**[read](../../../javax/imageio/stream/ImageInputStreamImpl.html#read%28%29)**()
Reads a single byte from the stream and returns it as anint
between 0 and 255.
int
**[read](../../../javax/imageio/stream/ImageInputStreamImpl.html#read%28byte[]%29)**(byte[] b)
A convenience method that calls read(b, 0, b.length)
.
abstract int
**[read](../../../javax/imageio/stream/ImageInputStreamImpl.html#read%28byte[],%20int,%20int%29)**(byte[] b, int off, int len)
Reads up to len
bytes from the stream, and stores them into b
starting at index off
.
int
**[readBit](../../../javax/imageio/stream/ImageInputStreamImpl.html#readBit%28%29)**()
Reads a single bit from the stream and returns it as anint
with the value 0
or1
.
long
**[readBits](../../../javax/imageio/stream/ImageInputStreamImpl.html#readBits%28int%29)**(int numBits)
Reads a bitstring from the stream and returns it as along
, with the first bit read becoming the most significant bit of the output.
boolean
**[readBoolean](../../../javax/imageio/stream/ImageInputStreamImpl.html#readBoolean%28%29)**()
Reads a byte from the stream and returns a boolean
value of true
if it is nonzero, false
if it is zero.
byte
**[readByte](../../../javax/imageio/stream/ImageInputStreamImpl.html#readByte%28%29)**()
Reads a byte from the stream and returns it as abyte
value.
void
**[readBytes](../../../javax/imageio/stream/ImageInputStreamImpl.html#readBytes%28javax.imageio.stream.IIOByteBuffer,%20int%29)**([IIOByteBuffer](../../../javax/imageio/stream/IIOByteBuffer.html "class in javax.imageio.stream") buf, int len)
Reads up to len
bytes from the stream, and modifies the supplied IIOByteBuffer
to indicate the byte array, offset, and length where the data may be found.
char
**[readChar](../../../javax/imageio/stream/ImageInputStreamImpl.html#readChar%28%29)**()
Equivalent to readUnsignedShort
, except that the result is returned using the char
datatype.
double
**[readDouble](../../../javax/imageio/stream/ImageInputStreamImpl.html#readDouble%28%29)**()
Reads 8 bytes from the stream, and (conceptually) concatenates them according to the current byte order and returns the result as a double
.
float
**[readFloat](../../../javax/imageio/stream/ImageInputStreamImpl.html#readFloat%28%29)**()
Reads 4 bytes from the stream, and (conceptually) concatenates them according to the current byte order and returns the result as a float
.
void
**[readFully](../../../javax/imageio/stream/ImageInputStreamImpl.html#readFully%28byte[]%29)**(byte[] b)
Reads b.length
bytes from the stream, and stores them into b
starting at index 0
.
void
**[readFully](../../../javax/imageio/stream/ImageInputStreamImpl.html#readFully%28byte[],%20int,%20int%29)**(byte[] b, int off, int len)
Reads len
bytes from the stream, and stores them into b
starting at index off
.
void
**[readFully](../../../javax/imageio/stream/ImageInputStreamImpl.html#readFully%28char[],%20int,%20int%29)**(char[] c, int off, int len)
Reads len
chars (unsigned 16-bit integers) from the stream according to the current byte order, and stores them into c
starting at indexoff
.
void
**[readFully](../../../javax/imageio/stream/ImageInputStreamImpl.html#readFully%28double[],%20int,%20int%29)**(double[] d, int off, int len)
Reads 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
.
void
**[readFully](../../../javax/imageio/stream/ImageInputStreamImpl.html#readFully%28float[],%20int,%20int%29)**(float[] f, int off, int len)
Reads 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
.
void
**[readFully](../../../javax/imageio/stream/ImageInputStreamImpl.html#readFully%28int[],%20int,%20int%29)**(int[] i, int off, int len)
Reads len
ints (signed 32-bit integers) from the stream according to the current byte order, and stores them into i
starting at indexoff
.
void
**[readFully](../../../javax/imageio/stream/ImageInputStreamImpl.html#readFully%28long[],%20int,%20int%29)**(long[] l, int off, int len)
Reads len
longs (signed 64-bit integers) from the stream according to the current byte order, and stores them into l
starting at indexoff
.
void
**[readFully](../../../javax/imageio/stream/ImageInputStreamImpl.html#readFully%28short[],%20int,%20int%29)**(short[] s, int off, int len)
Reads len
shorts (signed 16-bit integers) from the stream according to the current byte order, and stores them into s
starting at indexoff
.
int
**[readInt](../../../javax/imageio/stream/ImageInputStreamImpl.html#readInt%28%29)**()
Reads 4 bytes from the stream, and (conceptually) concatenates them according to the current byte order and returns the result as an int
.
[String](../../../java/lang/String.html "class in java.lang")
**[readLine](../../../javax/imageio/stream/ImageInputStreamImpl.html#readLine%28%29)**()
Reads the next line of text from the input stream.
long
**[readLong](../../../javax/imageio/stream/ImageInputStreamImpl.html#readLong%28%29)**()
Reads 8 bytes from the stream, and (conceptually) concatenates them according to the current byte order and returns the result as a long
.
short
**[readShort](../../../javax/imageio/stream/ImageInputStreamImpl.html#readShort%28%29)**()
Reads two bytes from the stream, and (conceptually) concatenates them according to the current byte order, and returns the result as a short
value.
int
**[readUnsignedByte](../../../javax/imageio/stream/ImageInputStreamImpl.html#readUnsignedByte%28%29)**()
Reads a byte from the stream, and (conceptually) converts it to an int, masks it with 0xff
in order to strip off any sign-extension bits, and returns it as a byte
value.
long
**[readUnsignedInt](../../../javax/imageio/stream/ImageInputStreamImpl.html#readUnsignedInt%28%29)**()
Reads 4 bytes from the stream, and (conceptually) concatenates them according to the current byte order, converts the result to a long, masks it with 0xffffffffL
in order to strip off any sign-extension bits, and returns the result as an unsigned long
value.
int
**[readUnsignedShort](../../../javax/imageio/stream/ImageInputStreamImpl.html#readUnsignedShort%28%29)**()
Reads two bytes from the stream, and (conceptually) concatenates them according to the current byte order, converts the resulting value to an int
, masks it with0xffff
in order to strip off any sign-extension buts, and returns the result as an unsigned int
value.
[String](../../../java/lang/String.html "class in java.lang")
**[readUTF](../../../javax/imageio/stream/ImageInputStreamImpl.html#readUTF%28%29)**()
Reads in a string that has been encoded using amodified UTF-8 format.
void
**[reset](../../../javax/imageio/stream/ImageInputStreamImpl.html#reset%28%29)**()
Resets the current stream byte and bit positions from the stack of marked positions.
void
**[seek](../../../javax/imageio/stream/ImageInputStreamImpl.html#seek%28long%29)**(long pos)
Sets the current stream position to the desired location.
void
**[setBitOffset](../../../javax/imageio/stream/ImageInputStreamImpl.html#setBitOffset%28int%29)**(int bitOffset)
Sets the bit offset to an integer between 0 and 7, inclusive.
void
**[setByteOrder](../../../javax/imageio/stream/ImageInputStreamImpl.html#setByteOrder%28java.nio.ByteOrder%29)**([ByteOrder](../../../java/nio/ByteOrder.html "class in java.nio") byteOrder)
Sets the desired byte order for future reads of data values from this stream.
int
**[skipBytes](../../../javax/imageio/stream/ImageInputStreamImpl.html#skipBytes%28int%29)**(int n)
Advances the current stream position by callingseek(getStreamPosition() + n)
.
long
**[skipBytes](../../../javax/imageio/stream/ImageInputStreamImpl.html#skipBytes%28long%29)**(long n)
Advances the current stream position by callingseek(getStreamPosition() + n)
.