Package com.twelvemonkeys.imageio.stream
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$
- Author:
- Harald Kuhr, last modified by $Author: haraldk$
-
Field Summary
Fields inherited from class javax.imageio.stream.ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Deprecated.protected void
finalize()
Deprecated.void
flushBefore
(long pos) Deprecated.long
Deprecated.boolean
isCached()
Deprecated.boolean
Deprecated.boolean
Deprecated.long
length()
Deprecated.int
read()
Deprecated.int
read
(byte[] pBuffer, int pOffset, int pLength) Deprecated.int
readBit()
Deprecated.long
readBits
(int numBits) Deprecated.int
readInt()
Deprecated.long
readLong()
Deprecated.short
Deprecated.void
seek
(long position) Deprecated.void
setByteOrder
(ByteOrder byteOrder) Deprecated.Methods inherited from class javax.imageio.stream.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, skipBytes
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.imageio.stream.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
-
Constructor Details
-
BufferedImageInputStream
Deprecated.- Throws:
IOException
-
-
Method Details
-
setByteOrder
Deprecated.- Specified by:
setByteOrder
in interfaceImageInputStream
- Overrides:
setByteOrder
in classImageInputStreamImpl
-
read
Deprecated.- Specified by:
read
in interfaceImageInputStream
- Specified by:
read
in classImageInputStreamImpl
- Throws:
IOException
-
read
Deprecated.- Specified by:
read
in interfaceImageInputStream
- Specified by:
read
in classImageInputStreamImpl
- Throws:
IOException
-
readShort
Deprecated.- Specified by:
readShort
in interfaceDataInput
- Specified by:
readShort
in interfaceImageInputStream
- Overrides:
readShort
in classImageInputStreamImpl
- Throws:
IOException
-
readInt
Deprecated.- Specified by:
readInt
in interfaceDataInput
- Specified by:
readInt
in interfaceImageInputStream
- Overrides:
readInt
in classImageInputStreamImpl
- Throws:
IOException
-
readLong
Deprecated.- Specified by:
readLong
in interfaceDataInput
- Specified by:
readLong
in interfaceImageInputStream
- Overrides:
readLong
in classImageInputStreamImpl
- Throws:
IOException
-
readBit
Deprecated.- Specified by:
readBit
in interfaceImageInputStream
- Overrides:
readBit
in classImageInputStreamImpl
- Throws:
IOException
-
readBits
Deprecated.- Specified by:
readBits
in interfaceImageInputStream
- Overrides:
readBits
in classImageInputStreamImpl
- Throws:
IOException
-
seek
Deprecated.- Specified by:
seek
in interfaceImageInputStream
- Overrides:
seek
in classImageInputStreamImpl
- Throws:
IOException
-
flushBefore
Deprecated.- Specified by:
flushBefore
in interfaceImageInputStream
- Overrides:
flushBefore
in classImageInputStreamImpl
- Throws:
IOException
-
getFlushedPosition
public long getFlushedPosition()Deprecated.- Specified by:
getFlushedPosition
in interfaceImageInputStream
- Overrides:
getFlushedPosition
in classImageInputStreamImpl
-
isCached
public boolean isCached()Deprecated.- Specified by:
isCached
in interfaceImageInputStream
- Overrides:
isCached
in classImageInputStreamImpl
-
isCachedMemory
public boolean isCachedMemory()Deprecated.- Specified by:
isCachedMemory
in interfaceImageInputStream
- Overrides:
isCachedMemory
in classImageInputStreamImpl
-
isCachedFile
public boolean isCachedFile()Deprecated.- Specified by:
isCachedFile
in interfaceImageInputStream
- Overrides:
isCachedFile
in classImageInputStreamImpl
-
close
Deprecated.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceImageInputStream
- Overrides:
close
in classImageInputStreamImpl
- Throws:
IOException
-
finalize
Deprecated.- Overrides:
finalize
in classImageInputStreamImpl
- Throws:
Throwable
-
length
public long length()Deprecated.- Specified by:
length
in interfaceImageInputStream
- Overrides:
length
in classImageInputStreamImpl
-
BufferedFileImageInputStream
instead.