Class BufferedImageInputStream
java.lang.Object
javax.imageio.stream.ImageInputStreamImpl
com.twelvemonkeys.imageio.stream.BufferedImageInputStream
- All Implemented Interfaces:
Closeable, DataInput, AutoCloseable, ImageInputStream
@Deprecated
public final class BufferedImageInputStream
extends ImageInputStreamImpl
implements ImageInputStream
Deprecated.
A buffered
ImageInputStream.
Experimental - seems to be effective for FileImageInputStream
and FileCacheImageInputStream when doing a lot of single-byte reads
(or short byte-array reads).
Code that uses the readFully methods are not affected by the issue.
NOTE: Invoking close() will NOT close the wrapped stream.
- Version:
- $Id: BufferedFileImageInputStream.java,v 1.0 May 15, 2008 4:36:49 PM haraldk Exp$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBufferDeprecated.(package private) static final intDeprecated.private final ByteBufferDeprecated.private final byte[]Deprecated.private ImageInputStreamDeprecated.Fields inherited from class ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos -
Constructor Summary
ConstructorsModifierConstructorDescriptionBufferedImageInputStream(ImageInputStream pStream) Deprecated.privateBufferedImageInputStream(ImageInputStream pStream, int pBufferSize) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.private voidDeprecated.protected voidfinalize()Deprecated.voidflushBefore(long pos) Deprecated.longDeprecated.booleanisCached()Deprecated.booleanDeprecated.booleanDeprecated.longlength()Deprecated.intread()Deprecated.intread(byte[] pBuffer, int pOffset, int pLength) Deprecated.intreadBit()Deprecated.longreadBits(int numBits) Deprecated.private intreadBuffered(byte[] pBuffer, int pOffset, int pLength) Deprecated.private intreadDirect(byte[] pBuffer, int pOffset, int pLength) Deprecated.intreadInt()Deprecated.longreadLong()Deprecated.shortDeprecated.voidseek(long position) Deprecated.voidsetByteOrder(ByteOrder byteOrder) Deprecated.Methods inherited from class ImageInputStreamImpl
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, skipBytesMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ImageInputStream
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
-
Field Details
-
DEFAULT_BUFFER_SIZE
static final int DEFAULT_BUFFER_SIZEDeprecated.- See Also:
-
stream
Deprecated. -
buffer
Deprecated. -
integralCache
Deprecated. -
integralCacheArray
private final byte[] integralCacheArrayDeprecated.
-
-
Constructor Details
-
BufferedImageInputStream
Deprecated.- Throws:
IOException
-
BufferedImageInputStream
Deprecated.- Throws:
IOException
-
-
Method Details
-
fillBuffer
-
setByteOrder
Deprecated.- Specified by:
setByteOrderin interfaceImageInputStream- Overrides:
setByteOrderin classImageInputStreamImpl
-
read
Deprecated.- Specified by:
readin interfaceImageInputStream- Specified by:
readin classImageInputStreamImpl- Throws:
IOException
-
read
Deprecated.- Specified by:
readin interfaceImageInputStream- Specified by:
readin classImageInputStreamImpl- Throws:
IOException
-
readDirect
Deprecated.- Throws:
IOException
-
readBuffered
private int readBuffered(byte[] pBuffer, int pOffset, int pLength) Deprecated. -
readShort
Deprecated.- Specified by:
readShortin interfaceDataInput- Specified by:
readShortin interfaceImageInputStream- Overrides:
readShortin classImageInputStreamImpl- Throws:
IOException
-
readInt
Deprecated.- Specified by:
readIntin interfaceDataInput- Specified by:
readIntin interfaceImageInputStream- Overrides:
readIntin classImageInputStreamImpl- Throws:
IOException
-
readLong
Deprecated.- Specified by:
readLongin interfaceDataInput- Specified by:
readLongin interfaceImageInputStream- Overrides:
readLongin classImageInputStreamImpl- Throws:
IOException
-
readBit
Deprecated.- Specified by:
readBitin interfaceImageInputStream- Overrides:
readBitin classImageInputStreamImpl- Throws:
IOException
-
readBits
Deprecated.- Specified by:
readBitsin interfaceImageInputStream- Overrides:
readBitsin classImageInputStreamImpl- Throws:
IOException
-
seek
Deprecated.- Specified by:
seekin interfaceImageInputStream- Overrides:
seekin classImageInputStreamImpl- Throws:
IOException
-
flushBefore
Deprecated.- Specified by:
flushBeforein interfaceImageInputStream- Overrides:
flushBeforein classImageInputStreamImpl- Throws:
IOException
-
getFlushedPosition
public long getFlushedPosition()Deprecated.- Specified by:
getFlushedPositionin interfaceImageInputStream- Overrides:
getFlushedPositionin classImageInputStreamImpl
-
isCached
public boolean isCached()Deprecated.- Specified by:
isCachedin interfaceImageInputStream- Overrides:
isCachedin classImageInputStreamImpl
-
isCachedMemory
public boolean isCachedMemory()Deprecated.- Specified by:
isCachedMemoryin interfaceImageInputStream- Overrides:
isCachedMemoryin classImageInputStreamImpl
-
isCachedFile
public boolean isCachedFile()Deprecated.- Specified by:
isCachedFilein interfaceImageInputStream- Overrides:
isCachedFilein classImageInputStreamImpl
-
close
Deprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceImageInputStream- Overrides:
closein classImageInputStreamImpl- Throws:
IOException
-
finalize
Deprecated.- Overrides:
finalizein classImageInputStreamImpl- Throws:
Throwable
-
length
public long length()Deprecated.- Specified by:
lengthin interfaceImageInputStream- Overrides:
lengthin classImageInputStreamImpl
-
BufferedFileImageInputStreaminstead.