public class FileImageInputStream extends ImageInputStreamImpl
ImageInputStream
that gets its
input from a File
or RandomAccessFile
.
The file contents are assumed to be stable during the lifetime of
the object.bitOffset, byteOrder, flushedPos, streamPos
Constructor | Description |
---|---|
FileImageInputStream(File f) |
Constructs a
FileImageInputStream that will read
from a given File . |
FileImageInputStream(RandomAccessFile raf) |
Constructs a
FileImageInputStream that will read
from a given RandomAccessFile . |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Closes the stream.
|
protected void |
finalize() |
Finalizes this object prior to garbage collection.
|
long |
length() |
Returns the length of the underlying file, or
-1
if it is unknown. |
int |
read() |
Reads a single byte from the stream and returns it as an
int between 0 and 255. |
int |
read(byte[] b,
int off,
int len) |
Reads up to
len bytes from the stream, and stores
them into b starting at index off . |
void |
seek(long pos) |
Sets the current stream position to the desired location.
|
checkClosed, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, mark, read, readBit, readBits, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, setByteOrder, skipBytes, skipBytes