org.teiid.internal.core.index
Class SafeRandomAccessFile

java.lang.Object
  extended by java.io.RandomAccessFile
      extended by org.teiid.internal.core.index.SafeRandomAccessFile
All Implemented Interfaces:
java.io.Closeable, java.io.DataInput, java.io.DataOutput

public class SafeRandomAccessFile
extends java.io.RandomAccessFile

A safe subclass of RandomAccessFile, which ensure that it's closed on finalize.


Constructor Summary
SafeRandomAccessFile(java.io.File file, java.lang.String mode)
           
SafeRandomAccessFile(java.lang.String name, java.lang.String mode)
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SafeRandomAccessFile

public SafeRandomAccessFile(java.io.File file,
                            java.lang.String mode)
                     throws java.io.IOException
Throws:
java.io.IOException

SafeRandomAccessFile

public SafeRandomAccessFile(java.lang.String name,
                            java.lang.String mode)
                     throws java.io.IOException
Throws:
java.io.IOException
Method Detail

finalize

protected void finalize()
                 throws java.io.IOException
Overrides:
finalize in class java.lang.Object
Throws:
java.io.IOException


Copyright © 2011. All Rights Reserved.