| javax.imageio.stream.ImageOutputStreamImpl com.sun.media.imageio.stream.FileChannelImageOutputStream
FileChannelImageOutputStream | public class FileChannelImageOutputStream extends ImageOutputStreamImpl (Code) | | A class which implements ImageOutputStream using a
FileChannel as the eventual data destination.
Memory mapping is used for reading and direct buffers for writing.
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.ImageOutputStream See Also: java.nio See Also: java.nio.channels.FileChannel |
Method Summary | |
public void | close() Invokes the superclass method, writes any unwritten data, 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, writes any unwritten data,
and sets the channel position to the supplied parameter. | public void | setByteOrder(ByteOrder networkByteOrder) | public void | write(int b) | public void | write(byte[] b, int off, int len) | public void | writeChars(char[] c, int off, int len) | public void | writeDoubles(double[] d, int off, int len) | public void | writeFloats(float[] f, int off, int len) | public void | writeInts(int[] i, int off, int len) | public void | writeLongs(long[] l, int off, int len) | public void | writeShorts(short[] s, int off, int len) |
FileChannelImageOutputStream | public FileChannelImageOutputStream(FileChannel channel) throws IOException(Code) | | Constructs a FileChannelImageOutputStream 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 destination 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, writes any unwritten data, 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) | | |
seek | public void seek(long pos) throws IOException(Code) | | Invokes the superclass method, writes any unwritten data,
and sets the channel position to the supplied parameter.
|
writeChars | public void writeChars(char[] c, int off, int len) throws IOException(Code) | | |
writeDoubles | public void writeDoubles(double[] d, int off, int len) throws IOException(Code) | | |
writeFloats | public void writeFloats(float[] f, int off, int len) throws IOException(Code) | | |
writeLongs | public void writeLongs(long[] l, int off, int len) throws IOException(Code) | | |
writeShorts | public void writeShorts(short[] s, int off, int len) throws IOException(Code) | | |
Methods inherited from javax.imageio.stream.ImageOutputStreamImpl | final protected void flushBits() throws IOException(Code)(Java Doc) abstract public void write(int b) throws IOException(Code)(Java Doc) public void write(byte b) throws IOException(Code)(Java Doc) abstract public void write(byte b, int off, int len) throws IOException(Code)(Java Doc) public void writeBit(int bit) throws IOException(Code)(Java Doc) public void writeBits(long bits, int numBits) throws IOException(Code)(Java Doc) public void writeBoolean(boolean v) throws IOException(Code)(Java Doc) public void writeByte(int v) throws IOException(Code)(Java Doc) public void writeBytes(String s) throws IOException(Code)(Java Doc) public void writeChar(int v) throws IOException(Code)(Java Doc) public void writeChars(String s) throws IOException(Code)(Java Doc) public void writeChars(char[] c, int off, int len) throws IOException(Code)(Java Doc) public void writeDouble(double v) throws IOException(Code)(Java Doc) public void writeDoubles(double[] d, int off, int len) throws IOException(Code)(Java Doc) public void writeFloat(float v) throws IOException(Code)(Java Doc) public void writeFloats(float[] f, int off, int len) throws IOException(Code)(Java Doc) public void writeInt(int v) throws IOException(Code)(Java Doc) public void writeInts(int[] i, int off, int len) throws IOException(Code)(Java Doc) public void writeLong(long v) throws IOException(Code)(Java Doc) public void writeLongs(long[] l, int off, int len) throws IOException(Code)(Java Doc) public void writeShort(int v) throws IOException(Code)(Java Doc) public void writeShorts(short[] s, int off, int len) throws IOException(Code)(Java Doc) public void writeUTF(String s) throws IOException(Code)(Java Doc)
|
|
|