Package org.teiid.internal.core.index
Class SafeRandomAccessFile
- java.lang.Object
-
- java.io.RandomAccessFile
-
- org.teiid.internal.core.index.SafeRandomAccessFile
-
- All Implemented Interfaces:
Closeable
,DataInput
,DataOutput
,AutoCloseable
public class SafeRandomAccessFile extends RandomAccessFile
A safe subclass of RandomAccessFile, which ensure that it's closed on finalize.
-
-
Constructor Summary
Constructors Constructor Description SafeRandomAccessFile(File file, String mode)
SafeRandomAccessFile(String name, String mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finalize()
-
Methods inherited from class java.io.RandomAccessFile
close, getChannel, getFD, getFilePointer, length, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
-
-
-
Constructor Detail
-
SafeRandomAccessFile
public SafeRandomAccessFile(File file, String mode) throws IOException
- Throws:
IOException
-
SafeRandomAccessFile
public SafeRandomAccessFile(String name, String mode) throws IOException
- Throws:
IOException
-
-
Method Detail
-
finalize
protected void finalize() throws IOException
- Overrides:
finalize
in classObject
- Throws:
IOException
-
-