Liking cljdoc? Tell your friends :D

javax.imageio.stream.FileCacheImageInputStream

An implementation of ImageInputStream that gets its input from a regular InputStream. A file is used to cache previously read data.

An implementation of ImageInputStream that gets its
input from a regular InputStream.  A file is used to
cache previously read data.
raw docstring

->file-cache-image-input-streamclj

(->file-cache-image-input-stream stream cache-dir)

Constructor.

Constructs a FileCacheImageInputStream that will read from a given InputStream.

A temporary file is used as a cache. If cacheDiris non-null and is a directory, the file will be created there. If it is null, the system-dependent default temporary-file directory will be used (see the documentation for File.createTempFile for details).

stream - an InputStream to read from. - java.io.InputStream cache-dir - a File indicating where the cache file should be created, or null to use the system directory. - java.io.File

throws: java.lang.IllegalArgumentException - if cacheDir is non-null but is not a directory.

Constructor.

Constructs a FileCacheImageInputStream that will read
 from a given InputStream.

  A temporary file is used as a cache.  If
 cacheDiris non-null and is a
 directory, the file will be created there.  If it is
 null, the system-dependent default temporary-file
 directory will be used (see the documentation for
 File.createTempFile for details).

stream - an InputStream to read from. - `java.io.InputStream`
cache-dir - a File indicating where the cache file should be created, or null to use the system directory. - `java.io.File`

throws: java.lang.IllegalArgumentException - if cacheDir is non-null but is not a directory.
raw docstring

cached-file?clj

(cached-file? this)

Returns true since this ImageInputStream maintains a file cache.

returns: true. - boolean

Returns true since this
 ImageInputStream maintains a file cache.

returns: true. - `boolean`
raw docstring

cached-memory?clj

(cached-memory? this)

Returns false since this ImageInputStream does not maintain a main memory cache.

returns: false. - boolean

Returns false since this
 ImageInputStream does not maintain a main memory
 cache.

returns: false. - `boolean`
raw docstring

cached?clj

(cached? this)

Returns true since this ImageInputStream caches data in order to allow seeking backwards.

returns: true. - boolean

Returns true since this
 ImageInputStream caches data in order to allow
 seeking backwards.

returns: true. - `boolean`
raw docstring

closeclj

(close this)

Closes this FileCacheImageInputStream, closing and removing the cache file. The source InputStream is not closed.

throws: java.io.IOException - if an error occurs.

Closes this FileCacheImageInputStream, closing
 and removing the cache file.  The source InputStream
 is not closed.

throws: java.io.IOException - if an error occurs.
raw docstring

readclj

(read this)
(read this b off len)

Description copied from class: ImageInputStreamImpl

b - an array of bytes to be written to. - byte[] off - the starting position within b to write to. - int len - the maximum number of bytes to read. - int

returns: the number of bytes actually read, or -1 to indicate EOF. - int

throws: java.io.IOException - if an I/O error occurs.

Description copied from class: ImageInputStreamImpl

b - an array of bytes to be written to. - `byte[]`
off - the starting position within b to write to. - `int`
len - the maximum number of bytes to read. - `int`

returns: the number of bytes actually read, or -1
 to indicate EOF. - `int`

throws: java.io.IOException - if an I/O error occurs.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close