Class ClosingFileReader
java.lang.Object
javax.imageio.stream.ImageInputStreamImpl
javax.imageio.stream.FileImageInputStream
com.ibm.j9ddr.corereaders.ClosingFileReader
- All Implemented Interfaces:
Closeable
,DataInput
,AutoCloseable
,ImageInputStream
A wrapper around the functionality that we require from RandomAccessFiles but
with the added auto-closing functionality that we require. Since it is not
always easy to determine who "owns" a file and we do not want to introduce
the concept of state, this class will manage all such file ownership.
We now also extend javax.imageio.stream.ImageInputStreamImpl as a convenient
common interface that we can share with the zebedee corefile reader.
-
Field Summary
Fields declared in class javax.imageio.stream.ImageInputStreamImpl
bitOffset, byteOrder, flushedPos, streamPos
-
Constructor Summary
ConstructorDescriptionClosingFileReader
(File file) ClosingFileReader
(File file, ByteOrder endian) Create a closing file reader with the given endianness which can close/delete the backing file on shutdown -
Method Summary
Methods declared in class javax.imageio.stream.FileImageInputStream
close, finalize, length, read, read, seek
Methods declared in class javax.imageio.stream.ImageInputStreamImpl
checkClosed, 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, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedShort, readUTF, reset, setBitOffset, setByteOrder, skipBytes, skipBytes
-
Constructor Details
-
ClosingFileReader
- Throws:
FileNotFoundException
IOException
-
ClosingFileReader
Create a closing file reader with the given endianness which can close/delete the backing file on shutdown- Parameters:
file
-endian
- therdeleteOnCloseOrExit
- Whether to delete the file when the file is closed or at shutdown- Throws:
FileNotFoundException
IOException
-