public class FileImageOutputStream extends ImageOutputStreamImpl
ImageOutputStream
that writes its
output directly to a File
or
RandomAccessFile
.bitOffset, byteOrder, flushedPos, streamPos
Constructor and Description |
---|
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 . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the stream.
|
protected void |
finalize()
Finalizes this object prior to garbage collection.
|
long |
length()
Returns
-1L to indicate that the stream has unknown
length. |
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 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.
|
flushBits, write, writeBit, writeBits, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeChars, writeDouble, writeDoubles, writeFloat, writeFloats, writeInt, writeInts, writeLong,