declare namespace javax {
namespace imageio {
namespace stream {
/**
* An implementation of ImageInputStream
that gets its
* input from a regular InputStream
. A memory buffer is
* used to cache at least the data between the discard position and
* the current read position.
*
In general, it is preferable to use a
* FileCacheImageInputStream
when reading from a regular
* InputStream
. This class is provided for cases where
* it is not possible to create a writable temporary file.
*/
// @ts-ignore
class MemoryCacheImageInputStream extends javax.imageio.stream.ImageInputStreamImpl {
/**
* Constructs a MemoryCacheImageInputStream
that will read
* from a given InputStream
.
* @param stream an InputStream
to read from.
* @exception IllegalArgumentException if stream
is
* null
.
*/
// @ts-ignore
constructor(stream: java.io.InputStream)
// @ts-ignore
public read(): number /*int*/
// @ts-ignore
public read(b: number /*byte*/[], off: number /*int*/, len: number /*int*/): number /*int*/
// @ts-ignore
public flushBefore(pos: number /*long*/): void
/**
* Returns true
since this
* ImageInputStream
caches data in order to allow
* seeking backwards.
* @return true
.
* @see #isCachedMemory
* @see #isCachedFile
*/
// @ts-ignore
public isCached(): boolean
/**
* Returns false
since this
* ImageInputStream
does not maintain a file cache.
* @return false
.
* @see #isCached
* @see #isCachedMemory
*/
// @ts-ignore
public isCachedFile(): boolean
/**
* Returns true
since this
* ImageInputStream
maintains a main memory cache.
* @return true
.
* @see #isCached
* @see #isCachedFile
*/
// @ts-ignore
public isCachedMemory(): boolean
/**
* Closes this MemoryCacheImageInputStream
, freeing
* the cache. The source InputStream
is not closed.
*/
// @ts-ignore
public close(): void
/**
* {@inheritDoc}
*/
// @ts-ignore
finalize(): void
}
}
}
}