Closeable
, DataInput
, AutoCloseable
, ImageInputStream
public final class SubImageInputStream extends ImageInputStreamImpl
ImageInputStream
to limit the number of bytes that can be read.bitOffset, byteOrder, flushedPos, streamPos
Constructor | Description |
---|---|
SubImageInputStream(ImageInputStream pStream,
long pLength) |
Creates a
ImageInputStream , reading up to a maximum number of bytes from the underlying stream. |
Modifier and Type | Method | Description |
---|---|---|
protected void |
finalize() |
|
long |
length() |
|
int |
read() |
|
int |
read(byte[] pBytes,
int pOffset,
int pLength) |
|
void |
seek(long pPosition) |
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, skipBytes
public SubImageInputStream(ImageInputStream pStream, long pLength) throws IOException
ImageInputStream
, reading up to a maximum number of bytes from the underlying stream.pStream
- the underlying streampLength
- the maximum length to read from the stream.
Note that pStream
may contain less than this maximum number of bytes.IOException
- if pStream
's position can't be determined.IllegalArgumentException
- if pStream == null
or pLength < 0
public int read() throws IOException
read
in interface ImageInputStream
read
in class ImageInputStreamImpl
IOException
public int read(byte[] pBytes, int pOffset, int pLength) throws IOException
read
in interface ImageInputStream
read
in class ImageInputStreamImpl
IOException
public long length()
length
in interface ImageInputStream
length
in class ImageInputStreamImpl
public void seek(long pPosition) throws IOException
seek
in interface ImageInputStream
seek
in class ImageInputStreamImpl
IOException
protected void finalize() throws Throwable
finalize
in class ImageInputStreamImpl
Throwable
Copyright © 2018. All rights reserved.