Package com.twelvemonkeys.imageio.stream
Class BufferedFileImageInputStream
java.lang.Object
javax.imageio.stream.ImageInputStreamImpl
com.twelvemonkeys.imageio.stream.BufferedFileImageInputStream
- All Implemented Interfaces:
Closeable,DataInput,AutoCloseable,ImageInputStream
Deprecated.
A buffered replacement for
FileImageInputStream
that provides greatly improved performance for shorter reads, like single
byte or bit reads.
As with javax.imageio.stream.FileImageInputStream, either
File or RandomAccessFile can be used as input.- See Also:
-
Field Summary
Fields inherited from class javax.imageio.stream.ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructs aBufferedFileImageInputStreamthat will read from a givenFile.Deprecated.Constructs aBufferedFileImageInputStreamthat will read from a givenRandomAccessFile. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.longlength()Deprecated.intread()Deprecated.intread(byte[] bytes, int offset, int length) Deprecated.intreadInt()Deprecated.longreadLong()Deprecated.shortDeprecated.voidseek(long position) Deprecated.voidsetByteOrder(ByteOrder byteOrder) Deprecated.Methods inherited from class javax.imageio.stream.ImageInputStreamImpl
checkClosed, finalize, 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, readLine, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, skipBytes, skipBytes
-
Constructor Details
-
BufferedFileImageInputStream
Deprecated.Constructs aBufferedFileImageInputStreamthat will read from a givenFile.- Parameters:
file- aFileto read from.- Throws:
IllegalArgumentException- iffileisnull.FileNotFoundException- iffileis a directory or cannot be opened for reading for any reason.
-
BufferedFileImageInputStream
Deprecated.Constructs aBufferedFileImageInputStreamthat will read from a givenRandomAccessFile.- Parameters:
raf- aRandomAccessFileto read from.- Throws:
IllegalArgumentException- ifrafisnull.
-
-
Method Details
-
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
-
length
public long length()Deprecated.- Specified by:
lengthin interfaceImageInputStream- Overrides:
lengthin classImageInputStreamImpl
-
close
Deprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceImageInputStream- Overrides:
closein classImageInputStreamImpl- Throws:
IOException
-
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
-
seek
Deprecated.- Specified by:
seekin interfaceImageInputStream- Overrides:
seekin classImageInputStreamImpl- Throws:
IOException
-
BufferedChannelImageInputStreaminstead.