public final class SubImageInputStream extends ImageInputStreamImpl
ImageInputStream to limit the number of bytes that can be read.bitOffset, byteOrder, flushedPos, streamPos| Constructor and Description |
|---|
SubImageInputStream(ImageInputStream stream,
long length)
Creates a
ImageInputStream, reading up to a maximum number of bytes from the underlying stream. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
long |
length() |
int |
read() |
int |
read(byte[] bytes,
int off,
int len) |
void |
seek(long position) |
checkClosed, close, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, getStreamPosition, isCached, isCachedFile, isCachedMemory, mark, read, readBit, readBits, 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 SubImageInputStream(ImageInputStream stream, long length) throws IOException
ImageInputStream, reading up to a maximum number of bytes from the underlying stream.stream - the underlying streamlength - the maximum length to read from the stream.
Note that stream may contain less than this maximum number of bytes.IOException - if stream's position can't be determined.IllegalArgumentException - if stream == null or length < 0public 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 long length()
length in interface ImageInputStreamlength in class ImageInputStreamImplpublic void seek(long position)
throws IOException
seek in interface ImageInputStreamseek in class ImageInputStreamImplIOExceptionprotected void finalize()
finalize in class ImageInputStreamImplCopyright © 2024. All rights reserved.