public class FileCacheImageOutputStream extends ImageOutputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos
Constructor and Description |
---|
FileCacheImageOutputStream(OutputStream s,
File cacheDir) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flushBefore(long pos) |
boolean |
isCached() |
boolean |
isCachedFile() |
boolean |
isCachedMemory() |
long |
length() |
int |
read() |
int |
read(byte[] data,
int offset,
int len) |
void |
seek(long pos) |
void |
write(byte[] data,
int offset,
int len)
Writes a region of data from an array into the stream.
|
void |
write(int value)
Writes an
int into the stream. |
flushBits, write, writeBit, writeBits, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeChars, writeDouble, writeDoubles, writeFloat, writeFloats, writeInt, writeInts, writeLong, writeLongs, writeShort, writeShorts, writeUTF
checkClosed, finalize, flush, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, 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
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
flush, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, 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
public FileCacheImageOutputStream(OutputStream s, File cacheDir) throws IOException
IOException
public void close() throws IOException
close
in interface ImageInputStream
close
in class ImageInputStreamImpl
IOException
public boolean isCached()
isCached
in interface ImageInputStream
isCached
in class ImageInputStreamImpl
public boolean isCachedFile()
isCachedFile
in interface ImageInputStream
isCachedFile
in class ImageInputStreamImpl
public boolean isCachedMemory()
isCachedMemory
in interface ImageInputStream
isCachedMemory
in class ImageInputStreamImpl
public int read() throws IOException
read
in interface ImageInputStream
read
in class ImageInputStreamImpl
IOException
public int read(byte[] data, int offset, int len) throws IOException
read
in interface ImageInputStream
read
in class ImageInputStreamImpl
IOException
public void write(byte[] data, int offset, int len) throws IOException
ImageOutputStream
write
in interface DataOutput
write
in interface ImageOutputStream
write
in class ImageOutputStreamImpl
data
- the data to be writtenoffset
- the offset in the arraylen
- the length in the arrayIOException
- if an errror occurspublic void write(int value) throws IOException
ImageOutputStream
int
into the stream.write
in interface DataOutput
write
in interface ImageOutputStream
write
in class ImageOutputStreamImpl
value
- the data to be writtenIOException
- if an errror occurspublic long length()
length
in interface ImageInputStream
length
in class ImageInputStreamImpl
public void seek(long pos) throws IOException
seek
in interface ImageInputStream
seek
in class ImageInputStreamImpl
IOException
public void flushBefore(long pos) throws IOException
flushBefore
in interface ImageInputStream
flushBefore
in interface ImageOutputStream
flushBefore
in class ImageInputStreamImpl
IOException
- if an errror occurs