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 aBufferedFileImageInputStream
that will read from a givenFile
.Deprecated.Constructs aBufferedFileImageInputStream
that will read from a givenRandomAccessFile
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Deprecated.long
length()
Deprecated.int
read()
Deprecated.int
read
(byte[] bytes, int offset, int length) 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, 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 aBufferedFileImageInputStream
that will read from a givenFile
.- Parameters:
file
- aFile
to read from.- Throws:
IllegalArgumentException
- iffile
isnull
.FileNotFoundException
- iffile
is a directory or cannot be opened for reading for any reason.
-
BufferedFileImageInputStream
Deprecated.Constructs aBufferedFileImageInputStream
that will read from a givenRandomAccessFile
.- Parameters:
raf
- aRandomAccessFile
to read from.- Throws:
IllegalArgumentException
- ifraf
isnull
.
-
-
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
-
length
public long length()Deprecated.- Specified by:
length
in interfaceImageInputStream
- Overrides:
length
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
-
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
-
seek
Deprecated.- Specified by:
seek
in interfaceImageInputStream
- Overrides:
seek
in classImageInputStreamImpl
- Throws:
IOException
-
BufferedChannelImageInputStream
instead.