ImageInputStream (Java Platform SE 7 ) (original) (raw)
Modifier and Type
Method and Description
void
**[close](../../../javax/imageio/stream/ImageInputStream.html#close%28%29)**()
Closes the stream.
void
**[flush](../../../javax/imageio/stream/ImageInputStream.html#flush%28%29)**()
Discards the initial position of the stream prior to the current stream position.
void
**[flushBefore](../../../javax/imageio/stream/ImageInputStream.html#flushBefore%28long%29)**(long pos)
Discards the initial portion of the stream prior to the indicated postion.
int
**[getBitOffset](../../../javax/imageio/stream/ImageInputStream.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/ImageInputStream.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/ImageInputStream.html#getFlushedPosition%28%29)**()
Returns the earliest position in the stream to which seeking may be performed.
long
**[getStreamPosition](../../../javax/imageio/stream/ImageInputStream.html#getStreamPosition%28%29)**()
Returns the current byte position of the stream.
boolean
**[isCached](../../../javax/imageio/stream/ImageInputStream.html#isCached%28%29)**()
Returns true if this ImageInputStream caches data itself in order to allow seeking backwards.
boolean
**[isCachedFile](../../../javax/imageio/stream/ImageInputStream.html#isCachedFile%28%29)**()
Returns true if this ImageInputStream caches data itself in order to allow seeking backwards, and the cache is kept in a temporary file.
boolean
**[isCachedMemory](../../../javax/imageio/stream/ImageInputStream.html#isCachedMemory%28%29)**()
Returns true if this ImageInputStream caches data itself in order to allow seeking backwards, and the cache is kept in main memory.
long
**[length](../../../javax/imageio/stream/ImageInputStream.html#length%28%29)**()
Returns the total length of the stream, if known.
void
**[mark](../../../javax/imageio/stream/ImageInputStream.html#mark%28%29)**()
Marks a position in the stream to be returned to by a subsequent call to reset.
int
**[read](../../../javax/imageio/stream/ImageInputStream.html#read%28%29)**()
Reads a single byte from the stream and returns it as an integer between 0 and 255.
int
**[read](../../../javax/imageio/stream/ImageInputStream.html#read%28byte[]%29)**(byte[] b)
Reads up to b.length bytes from the stream, and stores them into b starting at index 0.
int
**[read](../../../javax/imageio/stream/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.html#readByte%28%29)**()
Reads a byte from the stream and returns it as abyte value.
void
**[readBytes](../../../javax/imageio/stream/ImageInputStream.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/ImageInputStream.html#readChar%28%29)**()
Equivalent to readUnsignedShort, except that the result is returned using the char datatype.
double
**[readDouble](../../../javax/imageio/stream/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.html#readLine%28%29)**()
Reads the next line of text from the input stream.
long
**[readLong](../../../javax/imageio/stream/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.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/ImageInputStream.html#readUTF%28%29)**()
Reads in a string that has been encoded using amodified UTF-8 format.
void
**[reset](../../../javax/imageio/stream/ImageInputStream.html#reset%28%29)**()
Returns the stream pointer to its previous position, including the bit offset, at the time of the most recent unmatched call to mark.
void
**[seek](../../../javax/imageio/stream/ImageInputStream.html#seek%28long%29)**(long pos)
Sets the current stream position to the desired location.
void
**[setBitOffset](../../../javax/imageio/stream/ImageInputStream.html#setBitOffset%28int%29)**(int bitOffset)
Sets the bit offset to an integer between 0 and 7, inclusive.
void
**[setByteOrder](../../../javax/imageio/stream/ImageInputStream.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/ImageInputStream.html#skipBytes%28int%29)**(int n)
Moves the stream position forward by a given number of bytes.
long
**[skipBytes](../../../javax/imageio/stream/ImageInputStream.html#skipBytes%28long%29)**(long n)
Moves the stream position forward by a given number of bytes.