Closeable
, DataInput
, AutoCloseable
, ImageInputStream
public final class BufferedImageInputStream extends ImageInputStreamImpl implements ImageInputStream
ImageInputStream
.
Experimental - seems to be effective for FileImageInputStream
and FileCacheImageInputStream
when doing a lot of single-byte reads
(or short byte-array reads) on OS X at least.
Code that uses the readFully
methods are not affected by the issue.bitOffset, byteOrder, flushedPos, streamPos
Constructor | Description |
---|---|
BufferedImageInputStream(ImageInputStream pStream) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
protected void |
finalize() |
|
void |
flushBefore(long pos) |
|
long |
getFlushedPosition() |
|
boolean |
isCached() |
|
boolean |
isCachedFile() |
|
boolean |
isCachedMemory() |
|
long |
length() |
|
int |
read() |
|
int |
read(byte[] pBuffer,
int pOffset,
int pLength) |
|
int |
readBit() |
|
long |
readBits(int numBits) |
|
int |
readInt() |
|
long |
readLong() |
|
short |
readShort() |
|
void |
seek(long pPosition) |
|
void |
setByteOrder(ByteOrder byteOrder) |
flush, getBitOffset, getByteOrder, getStreamPosition, mark, read, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readLine, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, skipBytes, skipBytes
checkClosed, flush, getBitOffset, getByteOrder, getStreamPosition, mark, read, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readLine, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, skipBytes, skipBytes
public BufferedImageInputStream(ImageInputStream pStream) throws IOException
IOException
public void setByteOrder(ByteOrder byteOrder)
setByteOrder
in interface ImageInputStream
setByteOrder
in class ImageInputStreamImpl
public int read() throws IOException
read
in interface ImageInputStream
read
in class ImageInputStreamImpl
IOException
public int read(byte[] pBuffer, int pOffset, int pLength) throws IOException
read
in interface ImageInputStream
read
in class ImageInputStreamImpl
IOException
public short readShort() throws IOException
readShort
in interface DataInput
readShort
in interface ImageInputStream
readShort
in class ImageInputStreamImpl
IOException
public int readInt() throws IOException
readInt
in interface DataInput
readInt
in interface ImageInputStream
readInt
in class ImageInputStreamImpl
IOException
public long readLong() throws IOException
readLong
in interface DataInput
readLong
in interface ImageInputStream
readLong
in class ImageInputStreamImpl
IOException
public int readBit() throws IOException
readBit
in interface ImageInputStream
readBit
in class ImageInputStreamImpl
IOException
public long readBits(int numBits) throws IOException
readBits
in interface ImageInputStream
readBits
in class ImageInputStreamImpl
IOException
public void seek(long pPosition) throws IOException
seek
in interface ImageInputStream
seek
in class ImageInputStreamImpl
IOException
public void flushBefore(long pos) throws IOException
flushBefore
in interface ImageInputStream
flushBefore
in class ImageInputStreamImpl
IOException
public long getFlushedPosition()
getFlushedPosition
in interface ImageInputStream
getFlushedPosition
in class ImageInputStreamImpl
public boolean isCached()
isCached
in interface ImageInputStream
isCached
in class ImageInputStreamImpl
public boolean isCachedMemory()
isCachedMemory
in interface ImageInputStream
isCachedMemory
in class ImageInputStreamImpl
public boolean isCachedFile()
isCachedFile
in interface ImageInputStream
isCachedFile
in class ImageInputStreamImpl
public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in interface ImageInputStream
close
in class ImageInputStreamImpl
IOException
protected void finalize() throws Throwable
finalize
in class ImageInputStreamImpl
Throwable
public long length()
length
in interface ImageInputStream
length
in class ImageInputStreamImpl
Copyright © 2018. All rights reserved.