declare namespace javax {
namespace imageio {
namespace stream {
/**
* 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.
*/
// @ts-ignore
class MemoryCacheImageOutputStream extends javax.imageio.stream.ImageOutputStreamImpl {
/**
* Constructs a MemoryCacheImageOutputStream
that will write
* to a given OutputStream
.
* @param stream an OutputStream
to write to.
* @exception IllegalArgumentException if stream
is
* null
.
*/
// @ts-ignore
constructor(stream: java.io.OutputStream)
// @ts-ignore
public read(): number /*int*/
// @ts-ignore
public read(b: number /*byte*/[], off: number /*int*/, len: number /*int*/): number /*int*/
// @ts-ignore
public write(b: number /*int*/): void
// @ts-ignore
public write(b: number /*byte*/[], off: number /*int*/, len: number /*int*/): void
// @ts-ignore
public length(): number /*long*/
/**
* Returns true
since this
* ImageOutputStream
caches data in order to allow
* seeking backwards.
* @return true
.
* @see #isCachedMemory
* @see #isCachedFile
*/
// @ts-ignore
public isCached(): boolean
/**
* Returns false
since this
* ImageOutputStream
does not maintain a file cache.
* @return false
.
* @see #isCached
* @see #isCachedMemory
*/
// @ts-ignore
public isCachedFile(): boolean
/**
* Returns true
since this
* ImageOutputStream
maintains a main memory cache.
* @return true
.
* @see #isCached
* @see #isCachedFile
*/
// @ts-ignore
public isCachedMemory(): boolean
/**
* Closes this MemoryCacheImageOutputStream
. All
* pending data is flushed to the output, and the cache
* is released. The destination OutputStream
* is not closed.
*/
// @ts-ignore
public close(): void
// @ts-ignore
public flushBefore(pos: number /*long*/): void
}
}
}
}