javax.imageio.stream
Class MemoryCacheImageOutputStream

java.lang.Object
  extended by javax.imageio.stream.ImageInputStreamImpl
      extended by javax.imageio.stream.ImageOutputStreamImpl
          extended by javax.imageio.stream.MemoryCacheImageOutputStream
All Implemented Interfaces:
DataInput, DataOutput, ImageInputStream, ImageOutputStream

public class MemoryCacheImageOutputStream
extends ImageOutputStreamImpl


Field Summary
 
Fields inherited from class javax.imageio.stream.ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos
 
Constructor Summary
MemoryCacheImageOutputStream(OutputStream stream)
           
 
Method Summary
 void close()
           
 void flushBefore(long position)
           
 boolean isCached()
           
 boolean isCachedFile()
           
 boolean isCachedMemory()
           
 int read()
           
 int read(byte[] data, int offset, int len)
           
 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.
 
Methods inherited from class javax.imageio.stream.ImageOutputStreamImpl
flushBits, write, writeBit, writeBits, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeChars, writeDouble, writeDoubles, writeFloat, writeFloats, writeInt, writeInts, writeLong, writeLongs, writeShort, writeShorts, writeUTF
 
Methods inherited from class javax.imageio.stream.ImageInputStreamImpl
checkClosed, finalize, flush, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, length, 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, seek, setBitOffset, setByteOrder, skipBytes, skipBytes
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.imageio.stream.ImageInputStream
flush, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, length, 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, seek, setBitOffset, setByteOrder, skipBytes, skipBytes
 

Constructor Detail

MemoryCacheImageOutputStream

public MemoryCacheImageOutputStream(OutputStream stream)
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface ImageInputStream
Overrides:
close in class ImageInputStreamImpl
Throws:
IOException

flushBefore

public void flushBefore(long position)
                 throws IOException,
                        NotImplementedException
Specified by:
flushBefore in interface ImageInputStream
Specified by:
flushBefore in interface ImageOutputStream
Overrides:
flushBefore in class ImageInputStreamImpl
Throws:
IOException - if an errror occurs
NotImplementedException

isCached

public boolean isCached()
Specified by:
isCached in interface ImageInputStream
Overrides:
isCached in class ImageInputStreamImpl

isCachedFile

public boolean isCachedFile()
Specified by:
isCachedFile in interface ImageInputStream
Overrides:
isCachedFile in class ImageInputStreamImpl

isCachedMemory

public boolean isCachedMemory()
Specified by:
isCachedMemory in interface ImageInputStream
Overrides:
isCachedMemory in class ImageInputStreamImpl

read

public int read()
         throws IOException,
                NotImplementedException
Specified by:
read in interface ImageInputStream
Specified by:
read in class ImageInputStreamImpl
Throws:
IOException
NotImplementedException

read

public int read(byte[] data,
                int offset,
                int len)
         throws IOException,
                NotImplementedException
Specified by:
read in interface ImageInputStream
Specified by:
read in class ImageInputStreamImpl
Throws:
IOException
NotImplementedException

write

public void write(byte[] data,
                  int offset,
                  int len)
           throws IOException
Description copied from interface: ImageOutputStream
Writes a region of data from an array into the stream.

Specified by:
write in interface DataOutput
Specified by:
write in interface ImageOutputStream
Specified by:
write in class ImageOutputStreamImpl
Parameters:
data - the data to be written
offset - the offset in the array
len - the length in the array
Throws:
IOException - if an errror occurs

write

public void write(int value)
           throws IOException
Description copied from interface: ImageOutputStream
Writes an int into the stream.

Specified by:
write in interface DataOutput
Specified by:
write in interface ImageOutputStream
Specified by:
write in class ImageOutputStreamImpl
Parameters:
value - the data to be written
Throws:
IOException - if an errror occurs