public final class DirectImageInputStream extends ImageInputStreamImpl
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.
bitOffset, byteOrder, flushedPos, streamPos| Constructor and Description |
|---|
DirectImageInputStream(InputStream stream) |
DirectImageInputStream(InputStream stream,
long length) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getFlushedPosition() |
long |
length() |
int |
read() |
int |
read(byte[] bytes,
int off,
int len) |
int |
readBit() |
long |
readBits(int numBits) |
void |
seek(long pos) |
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, skipBytespublic DirectImageInputStream(InputStream stream)
public DirectImageInputStream(InputStream stream, long length)
public int read()
throws IOException
read in interface ImageInputStreamread in class ImageInputStreamImplIOExceptionpublic int read(byte[] bytes,
int off,
int len)
throws IOException
read in interface ImageInputStreamread in class ImageInputStreamImplIOExceptionpublic void seek(long pos)
throws IOException
seek in interface ImageInputStreamseek in class ImageInputStreamImplIOExceptionpublic long getFlushedPosition()
getFlushedPosition in interface ImageInputStreamgetFlushedPosition in class ImageInputStreamImplpublic long length()
length in interface ImageInputStreamlength in class ImageInputStreamImplpublic int readBit()
throws IOException
readBit in interface ImageInputStreamreadBit in class ImageInputStreamImplIOExceptionpublic long readBits(int numBits)
throws IOException
readBits in interface ImageInputStreamreadBits in class ImageInputStreamImplIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ImageInputStreamclose in class ImageInputStreamImplIOExceptionCopyright © 2024. All rights reserved.