| java.lang.Object javax.imageio.stream.ImageInputStreamImpl com.sun.media.imageio.stream.FileChannelImageInputStream
FileChannelImageInputStream | public class FileChannelImageInputStream extends ImageInputStreamImpl (Code) | | A class which implements ImageInputStream using a
FileChannel as the eventual data source. The channel
contents are assumed to be stable during the lifetime of the object.
Memory mapping and new I/O view Buffer s are used to
read the data. Only methods which provide significant performance
improvement with respect to the superclass implementation are overridden.
Overridden methods are not commented individually unless some noteworthy
aspect of the implementation must be described.
The methods of this class are not synchronized.
See Also: javax.imageio.stream.ImageInputStream See Also: java.nio See Also: java.nio.channels.FileChannel |
Method Summary | |
public void | close() Invokes the superclass method and sets the internal reference
to the source FileChannel to null . | public long | length() Returns the number of bytes currently in the FileChannel . | public int | read() | public int | read(byte[] b, int off, int len) | public void | readFully(char[] c, int off, int len) | public void | readFully(short[] s, int off, int len) | public void | readFully(int[] i, int off, int len) | public void | readFully(long[] l, int off, int len) | public void | readFully(float[] f, int off, int len) | public void | readFully(double[] d, int off, int len) | public void | seek(long pos) Invokes the superclass method and sets the position within the
memory mapped buffer. | public void | setByteOrder(ByteOrder networkByteOrder) |
FileChannelImageInputStream | public FileChannelImageInputStream(FileChannel channel) throws IOException(Code) | | Constructs a FileChannelImageInputStream from a
FileChannel . The initial position of the stream
stream is taken to be the position of the FileChannel
parameter when this constructor is invoked. The stream and flushed
positions are therefore both initialized to
channel.position() .
Parameters: channel - the source FileChannel . throws: IllegalArgumentException - if channel isnull or is not open. throws: IOException - if a method invoked on channel throws an IOException . |
close | public void close() throws IOException(Code) | | Invokes the superclass method and sets the internal reference
to the source FileChannel to null .
The source FileChannel is not closed.
exception: IOException - if an error occurs. |
length | public long length()(Code) | | Returns the number of bytes currently in the FileChannel .
If an IOException is encountered when querying the
channel's size, -1L will be returned.
The number of bytes in the channel-1L to indicate unknown length. |
readFully | public void readFully(double[] d, int off, int len) throws IOException(Code) | | |
Methods inherited from javax.imageio.stream.ImageInputStreamImpl | final protected void checkClosed() throws IOException(Code)(Java Doc) public void close() throws IOException(Code)(Java Doc) protected void finalize() throws Throwable(Code)(Java Doc) public void flush() throws IOException(Code)(Java Doc) public void flushBefore(long pos) throws IOException(Code)(Java Doc) public int getBitOffset() throws IOException(Code)(Java Doc) public ByteOrder getByteOrder()(Code)(Java Doc) public long getFlushedPosition()(Code)(Java Doc) public long getStreamPosition() throws IOException(Code)(Java Doc) public boolean isCached()(Code)(Java Doc) public boolean isCachedFile()(Code)(Java Doc) public boolean isCachedMemory()(Code)(Java Doc) public long length()(Code)(Java Doc) public void mark()(Code)(Java Doc) abstract public int read() throws IOException(Code)(Java Doc) public int read(byte[] b) throws IOException(Code)(Java Doc) abstract public int read(byte[] b, int off, int len) throws IOException(Code)(Java Doc) public int readBit() throws IOException(Code)(Java Doc) public long readBits(int numBits) throws IOException(Code)(Java Doc) public boolean readBoolean() throws IOException(Code)(Java Doc) public byte readByte() throws IOException(Code)(Java Doc) public void readBytes(IIOByteBuffer buf, int len) throws IOException(Code)(Java Doc) public char readChar() throws IOException(Code)(Java Doc) public double readDouble() throws IOException(Code)(Java Doc) public float readFloat() throws IOException(Code)(Java Doc) public void readFully(byte[] b, int off, int len) throws IOException(Code)(Java Doc) public void readFully(byte[] b) throws IOException(Code)(Java Doc) public void readFully(short[] s, int off, int len) throws IOException(Code)(Java Doc) public void readFully(char[] c, int off, int len) throws IOException(Code)(Java Doc) public void readFully(int[] i, int off, int len) throws IOException(Code)(Java Doc) public void readFully(long[] l, int off, int len) throws IOException(Code)(Java Doc) public void readFully(float[] f, int off, int len) throws IOException(Code)(Java Doc) public void readFully(double[] d, int off, int len) throws IOException(Code)(Java Doc) public int readInt() throws IOException(Code)(Java Doc) public String readLine() throws IOException(Code)(Java Doc) public long readLong() throws IOException(Code)(Java Doc) public short readShort() throws IOException(Code)(Java Doc) public String readUTF() throws IOException(Code)(Java Doc) public int readUnsignedByte() throws IOException(Code)(Java Doc) public long readUnsignedInt() throws IOException(Code)(Java Doc) public int readUnsignedShort() throws IOException(Code)(Java Doc) public void reset() throws IOException(Code)(Java Doc) public void seek(long pos) throws IOException(Code)(Java Doc) public void setBitOffset(int bitOffset) throws IOException(Code)(Java Doc) public void setByteOrder(ByteOrder byteOrder)(Code)(Java Doc) public int skipBytes(int n) throws IOException(Code)(Java Doc) public long skipBytes(long n) throws IOException(Code)(Java Doc)
|
|
|