Class DirectImageInputStream
java.lang.Object
javax.imageio.stream.ImageInputStreamImpl
com.twelvemonkeys.imageio.stream.DirectImageInputStream
- All Implemented Interfaces:
Closeable, DataInput, AutoCloseable, ImageInputStream
An
ImageInputStream that adapts an InputSteam,
by reading directly from the stream without and form of caching or buffering.
Note: This is not a general-purpose ImageInputStream, and is designed for reading large chunks,
typically of pixel data, from an InputStream.
It does not support backwards seeking, or reading bits.
-
Field Summary
FieldsFields inherited from class ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos -
Constructor Summary
ConstructorsConstructorDescriptionDirectImageInputStream(InputStream stream) DirectImageInputStream(InputStream stream, long length) -
Method Summary
Methods inherited from class ImageInputStreamImpl
checkClosed, finalize, flush, flushBefore, getBitOffset, getByteOrder, getStreamPosition, isCached, isCachedFile, isCachedMemory, mark, read, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, setByteOrder, skipBytes, skipBytes
-
Field Details
-
stream
-
length
private final long length
-
-
Constructor Details
-
DirectImageInputStream
-
DirectImageInputStream
-
-
Method Details
-
read
- Specified by:
readin interfaceImageInputStream- Specified by:
readin classImageInputStreamImpl- Throws:
IOException
-
read
- Specified by:
readin interfaceImageInputStream- Specified by:
readin classImageInputStreamImpl- Throws:
IOException
-
seek
- Specified by:
seekin interfaceImageInputStream- Overrides:
seekin classImageInputStreamImpl- Throws:
IOException
-
getFlushedPosition
public long getFlushedPosition()- Specified by:
getFlushedPositionin interfaceImageInputStream- Overrides:
getFlushedPositionin classImageInputStreamImpl
-
length
public long length()- Specified by:
lengthin interfaceImageInputStream- Overrides:
lengthin classImageInputStreamImpl
-
readBit
- Specified by:
readBitin interfaceImageInputStream- Overrides:
readBitin classImageInputStreamImpl- Throws:
IOException
-
readBits
- Specified by:
readBitsin interfaceImageInputStream- Overrides:
readBitsin classImageInputStreamImpl- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceImageInputStream- Overrides:
closein classImageInputStreamImpl- Throws:
IOException
-