An abstract class implementing the ImageInputStream interface. This class is designed to reduce the number of methods that must be implemented by subclasses.
In particular, this class handles most or all of the details of byte order interpretation, buffering, mark/reset, discarding, closing, and disposing.
An abstract class implementing the ImageInputStream interface. This class is designed to reduce the number of methods that must be implemented by subclasses. In particular, this class handles most or all of the details of byte order interpretation, buffering, mark/reset, discarding, closing, and disposing.
(->image-input-stream-impl)
Constructor.
Constructs an ImageInputStreamImpl.
Constructor. Constructs an ImageInputStreamImpl.
(cached-file? this)
Default implementation returns false. Subclasses should override this if they cache data in a temporary file.
returns: true if this ImageInputStream
caches data in a temporary file. - boolean
Default implementation returns false. Subclasses should override this if they cache data in a temporary file. returns: true if this ImageInputStream caches data in a temporary file. - `boolean`
(cached-memory? this)
Default implementation returns false. Subclasses should override this if they cache data in main memory.
returns: true if this ImageInputStream
caches data in main memory. - boolean
Default implementation returns false. Subclasses should override this if they cache data in main memory. returns: true if this ImageInputStream caches data in main memory. - `boolean`
(cached? this)
Default implementation returns false. Subclasses should override this if they cache data.
returns: true if this ImageInputStream
caches data. - boolean
Default implementation returns false. Subclasses should override this if they cache data. returns: true if this ImageInputStream caches data. - `boolean`
(close this)
Description copied from interface: ImageInputStream
throws: java.io.IOException - if an I/O error occurs.
Description copied from interface: ImageInputStream throws: java.io.IOException - if an I/O error occurs.
(flush this)
Description copied from interface: ImageInputStream
throws: java.io.IOException - if an I/O error occurs.
Description copied from interface: ImageInputStream throws: java.io.IOException - if an I/O error occurs.
(flush-before this pos)
Description copied from interface: ImageInputStream
pos - a long containing the length of the stream prefix that may be flushed. - long
throws: java.io.IOException - if an I/O error occurs.
Description copied from interface: ImageInputStream pos - a long containing the length of the stream prefix that may be flushed. - `long` throws: java.io.IOException - if an I/O error occurs.
(get-bit-offset this)
Description copied from interface: ImageInputStream
returns: an int containing the bit offset between
0 and 7, inclusive. - int
throws: java.io.IOException - if an I/O error occurs.
Description copied from interface: ImageInputStream returns: an int containing the bit offset between 0 and 7, inclusive. - `int` throws: java.io.IOException - if an I/O error occurs.
(get-byte-order this)
Description copied from interface: ImageInputStream
returns: one of ByteOrder.BIG_ENDIAN or
ByteOrder.LITTLE_ENDIAN, indicating which byte
order is being used. - java.nio.ByteOrder
Description copied from interface: ImageInputStream returns: one of ByteOrder.BIG_ENDIAN or ByteOrder.LITTLE_ENDIAN, indicating which byte order is being used. - `java.nio.ByteOrder`
(get-flushed-position this)
Description copied from interface: ImageInputStream
returns: the earliest legal position for seeking, as a
long. - long
Description copied from interface: ImageInputStream returns: the earliest legal position for seeking, as a long. - `long`
(get-stream-position this)
Description copied from interface: ImageInputStream
returns: a long containing the position of the stream. - long
throws: java.io.IOException - if an I/O error occurs.
Description copied from interface: ImageInputStream returns: a long containing the position of the stream. - `long` throws: java.io.IOException - if an I/O error occurs.
(length this)
Returns -1L to indicate that the stream has unknown length. Subclasses must override this method to provide actual length information.
returns: -1L to indicate unknown length. - long
Returns -1L to indicate that the stream has unknown length. Subclasses must override this method to provide actual length information. returns: -1L to indicate unknown length. - `long`
(mark this)
Pushes the current stream position onto a stack of marked positions.
Pushes the current stream position onto a stack of marked positions.
(read this)
(read this b)
(read this b off len)
Reads up to len bytes from the stream, and stores them into b starting at index off. If no bytes can be read because the end of the stream has been reached, -1 is returned.
The bit offset within the stream must be reset to zero before the read occurs.
Subclasses must provide an implementation for this method. The subclass implementation should update the stream position before exiting.
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.lang.IndexOutOfBoundsException - if off is negative, len is negative, or off len is greater than b.length.
Reads up to len bytes from the stream, and stores them into b starting at index off. If no bytes can be read because the end of the stream has been reached, -1 is returned. The bit offset within the stream must be reset to zero before the read occurs. Subclasses must provide an implementation for this method. The subclass implementation should update the stream position before exiting. 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.lang.IndexOutOfBoundsException - if off is negative, len is negative, or off len is greater than b.length.
(read-bit this)
Description copied from interface: ImageInputStream
returns: an int containing the value 0
or 1. - int
throws: java.io.EOFException - if the stream reaches the end before reading all the bits.
Description copied from interface: ImageInputStream returns: an int containing the value 0 or 1. - `int` throws: java.io.EOFException - if the stream reaches the end before reading all the bits.
(read-bits this num-bits)
Description copied from interface: ImageInputStream
num-bits - the number of bits to read, as an int between 0 and 64, inclusive. - int
returns: the bitstring, as a long with the last bit
read stored in the least significant bit. - long
throws: java.io.EOFException - if the stream reaches the end before reading all the bits.
Description copied from interface: ImageInputStream num-bits - the number of bits to read, as an int between 0 and 64, inclusive. - `int` returns: the bitstring, as a long with the last bit read stored in the least significant bit. - `long` throws: java.io.EOFException - if the stream reaches the end before reading all the bits.
(read-boolean this)
Description copied from interface: ImageInputStream
returns: a boolean value from the stream. - boolean
throws: java.io.EOFException - if the end of the stream is reached.
Description copied from interface: ImageInputStream returns: a boolean value from the stream. - `boolean` throws: java.io.EOFException - if the end of the stream is reached.
(read-byte this)
Description copied from interface: ImageInputStream
returns: a signed byte value from the stream. - byte
throws: java.io.EOFException - if the end of the stream is reached.
Description copied from interface: ImageInputStream returns: a signed byte value from the stream. - `byte` throws: java.io.EOFException - if the end of the stream is reached.
(read-bytes this buf len)
Description copied from interface: ImageInputStream
buf - an IIOByteBuffer object to be modified. - javax.imageio.stream.IIOByteBuffer
len - the maximum number of bytes to read. - int
throws: java.io.IOException - if an I/O error occurs.
Description copied from interface: ImageInputStream buf - an IIOByteBuffer object to be modified. - `javax.imageio.stream.IIOByteBuffer` len - the maximum number of bytes to read. - `int` throws: java.io.IOException - if an I/O error occurs.
(read-char this)
Description copied from interface: ImageInputStream
returns: an unsigned char value from the stream. - char
throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
Description copied from interface: ImageInputStream returns: an unsigned char value from the stream. - `char` throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
(read-double this)
Description copied from interface: ImageInputStream
returns: a double value from the stream. - double
throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
Description copied from interface: ImageInputStream returns: a double value from the stream. - `double` throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
(read-float this)
Description copied from interface: ImageInputStream
returns: a float value from the stream. - float
throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
Description copied from interface: ImageInputStream returns: a float value from the stream. - `float` throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
(read-fully this b)
(read-fully this b off len)
Description copied from interface: ImageInputStream
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
throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
Description copied from interface: ImageInputStream 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` throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
(read-int this)
Description copied from interface: ImageInputStream
returns: a signed int value from the stream. - int
throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
Description copied from interface: ImageInputStream returns: a signed int value from the stream. - `int` throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
(read-line this)
Description copied from interface: ImageInputStream
returns: a String containing a line of text from the stream. - java.lang.String
throws: java.io.IOException - if an I/O error occurs.
Description copied from interface: ImageInputStream returns: a String containing a line of text from the stream. - `java.lang.String` throws: java.io.IOException - if an I/O error occurs.
(read-long this)
Description copied from interface: ImageInputStream
returns: a signed long value from the stream. - long
throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
Description copied from interface: ImageInputStream returns: a signed long value from the stream. - `long` throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
(read-short this)
Description copied from interface: ImageInputStream
returns: a signed short value from the stream. - short
throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
Description copied from interface: ImageInputStream returns: a signed short value from the stream. - `short` throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
(read-unsigned-byte this)
Description copied from interface: ImageInputStream
returns: an unsigned byte value from the stream. - int
throws: java.io.EOFException - if the end of the stream is reached.
Description copied from interface: ImageInputStream returns: an unsigned byte value from the stream. - `int` throws: java.io.EOFException - if the end of the stream is reached.
(read-unsigned-int this)
Description copied from interface: ImageInputStream
returns: an unsigned int value from the stream, as a long. - long
throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
Description copied from interface: ImageInputStream returns: an unsigned int value from the stream, as a long. - `long` throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
(read-unsigned-short this)
Description copied from interface: ImageInputStream
returns: an unsigned short value from the stream, as an int. - int
throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
Description copied from interface: ImageInputStream returns: an unsigned short value from the stream, as an int. - `int` throws: java.io.EOFException - if the stream reaches the end before reading all the bytes.
(read-utf this)
Description copied from interface: ImageInputStream
returns: a String read from the stream. - java.lang.String
throws: java.io.EOFException - if this stream reaches the end before reading all the bytes.
Description copied from interface: ImageInputStream returns: a String read from the stream. - `java.lang.String` throws: java.io.EOFException - if this stream reaches the end before reading all the bytes.
(reset this)
Resets the current stream byte and bit positions from the stack of marked positions.
An IOException will be thrown if the previous marked position lies in the discarded portion of the stream.
throws: java.io.IOException - if an I/O error occurs.
Resets the current stream byte and bit positions from the stack of marked positions. An IOException will be thrown if the previous marked position lies in the discarded portion of the stream. throws: java.io.IOException - if an I/O error occurs.
(seek this pos)
Description copied from interface: ImageInputStream
pos - a long containing the desired file pointer position. - long
throws: java.io.IOException - if any other I/O error occurs.
Description copied from interface: ImageInputStream pos - a long containing the desired file pointer position. - `long` throws: java.io.IOException - if any other I/O error occurs.
(set-bit-offset this bit-offset)
Description copied from interface: ImageInputStream
bit-offset - the desired offset, as an int between 0 and 7, inclusive. - int
throws: java.io.IOException - if an I/O error occurs.
Description copied from interface: ImageInputStream bit-offset - the desired offset, as an int between 0 and 7, inclusive. - `int` throws: java.io.IOException - if an I/O error occurs.
(set-byte-order this byte-order)
Description copied from interface: ImageInputStream
byte-order - one of ByteOrder.BIG_ENDIAN or java.nio.ByteOrder.LITTLE_ENDIAN, indicating whether network byte order or its reverse will be used for future reads. - java.nio.ByteOrder
Description copied from interface: ImageInputStream byte-order - one of ByteOrder.BIG_ENDIAN or java.nio.ByteOrder.LITTLE_ENDIAN, indicating whether network byte order or its reverse will be used for future reads. - `java.nio.ByteOrder`
(skip-bytes this n)
Advances the current stream position by calling seek(getStreamPosition() n).
The bit offset is reset to zero.
n - the number of bytes to seek forward. - int
returns: an int representing the number of bytes
skipped. - int
throws: java.io.IOException - if getStreamPosition throws an IOException when computing either the starting or ending position.
Advances the current stream position by calling seek(getStreamPosition() n). The bit offset is reset to zero. n - the number of bytes to seek forward. - `int` returns: an int representing the number of bytes skipped. - `int` throws: java.io.IOException - if getStreamPosition throws an IOException when computing either the starting or ending position.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close