com.twelvemonkeys.imageio.stream
Class BufferedImageInputStream
java.lang.Object
javax.imageio.stream.ImageInputStreamImpl
com.twelvemonkeys.imageio.stream.BufferedImageInputStream
- All Implemented Interfaces:
- DataInput, ImageInputStream
public final class BufferedImageInputStream
- extends ImageInputStreamImpl
- implements ImageInputStream
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) on OS X at least.
Code that uses the readFully methods are not affected by the issue.
- Version:
- $Id: BufferedFileImageInputStream.java,v 1.0 May 15, 2008 4:36:49 PM haraldk Exp$
- Author:
- Harald Kuhr, last modified by $Author: haraldk$
| Methods inherited from class javax.imageio.stream.ImageInputStreamImpl |
checkClosed, flush, getBitOffset, getByteOrder, getStreamPosition, 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 |
| Methods inherited from interface javax.imageio.stream.ImageInputStream |
flush, getBitOffset, getByteOrder, getStreamPosition, 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 |
BufferedImageInputStream
public BufferedImageInputStream(ImageInputStream pStream)
throws IOException
- Throws:
IOException
read
public int read()
throws IOException
- Specified by:
read in interface ImageInputStream- Specified by:
read in class ImageInputStreamImpl
- Throws:
IOException
read
public int read(byte[] pBuffer,
int pOffset,
int pLength)
throws IOException
- Specified by:
read in interface ImageInputStream- Specified by:
read in class ImageInputStreamImpl
- Throws:
IOException
seek
public void seek(long pPosition)
throws IOException
- Specified by:
seek in interface ImageInputStream- Overrides:
seek in class ImageInputStreamImpl
- Throws:
IOException
flushBefore
public void flushBefore(long pos)
throws IOException
- Specified by:
flushBefore in interface ImageInputStream- Overrides:
flushBefore in class ImageInputStreamImpl
- Throws:
IOException
getFlushedPosition
public long getFlushedPosition()
- Specified by:
getFlushedPosition in interface ImageInputStream- Overrides:
getFlushedPosition in class ImageInputStreamImpl
isCached
public boolean isCached()
- Specified by:
isCached in interface ImageInputStream- Overrides:
isCached in class ImageInputStreamImpl
isCachedMemory
public boolean isCachedMemory()
- Specified by:
isCachedMemory in interface ImageInputStream- Overrides:
isCachedMemory in class ImageInputStreamImpl
isCachedFile
public boolean isCachedFile()
- Specified by:
isCachedFile in interface ImageInputStream- Overrides:
isCachedFile in class ImageInputStreamImpl
close
public void close()
throws IOException
- Specified by:
close in interface ImageInputStream- Overrides:
close in class ImageInputStreamImpl
- Throws:
IOException
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class ImageInputStreamImpl
- Throws:
Throwable
length
public long length()
- Specified by:
length in interface ImageInputStream- Overrides:
length in class ImageInputStreamImpl
Copyright © 2015. All Rights Reserved.