javax.imageio.stream
Class FileImageOutputStreamjava.lang.Object | +--javax.imageio.stream.ImageInputStreamImpl | +--javax.imageio.stream.ImageOutputStreamImpl | +--javax.imageio.stream.FileImageOutputStream
- All Implemented Interfaces:
- DataInput, DataOutput, ImageInputStream, ImageOutputStream
- public class FileImageOutputStream
- extends ImageOutputStreamImpl
An implementation of ImageOutputStream that writes its output directly to a File or RandomAccessFile.
Field Summary
Fields inherited from class javax.imageio.stream.ImageInputStreamImpl bitOffset, byteOrder, flushedPos, streamPos
Constructor Summary
FileImageOutputStream(File f)
Constructs a FileImageOutputStream that will write to a given File.FileImageOutputStream(RandomAccessFile raf)
Constructs a FileImageOutputStream that will write to a given RandomAccessFile.
Method Summary
void close()
Closes the stream.long length()
Returns the total length of the stream, if known.int read()
Reads a single byte from the stream and returns it as an integer 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 and resets the bit offset to 0.void write(byte[] b, int off, int len)
Writes a sequence of bytes to the stream at the current position.void write(int b)
Writes a single byte to the stream at the current position.
Methods inherited from class javax.imageio.stream.ImageOutputStreamImpl flushBits, write, writeBit, writeBits, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeChars,