Module java.desktop

Class MemoryCacheImageOutputStream

  • All Implemented Interfaces:
    Closeable, DataInput, DataOutput, AutoCloseable, ImageInputStream, ImageOutputStream

    public class MemoryCacheImageOutputStream
    extends ImageOutputStreamImpl
    An implementation of ImageOutputStream that writes its output to a regular OutputStream. A memory buffer is used to cache at least the data between the discard position and the current write position. The only constructor takes an OutputStream, so this class may not be used for read/modify/write operations. Reading can occur only on parts of the stream that have already been written to the cache and not yet flushed.