com.go.trove.io
Class TemporaryFile

java.lang.Object
  |
  +--java.io.RandomAccessFile
        |
        +--com.go.trove.io.TemporaryFile
All Implemented Interfaces:
java.io.DataInput, java.io.DataOutput

public class TemporaryFile
extends java.io.RandomAccessFile

Provides references to temporary files that are automatically deleted when closed, finalized, or when the system exits.

Version:
12 , 00/12/05
Author:
Brian S O'Neill

Method Summary
 void close()
           
static java.io.RandomAccessFile createTemporaryFile(java.lang.String prefix, java.lang.String suffix)
          Creates a new writable temporary file that is deleted when closed, finalized, or when the system exits.
static java.io.RandomAccessFile createTemporaryFile(java.lang.String prefix, java.lang.String suffix, java.io.File directory)
          Creates a new writable temporary file that is deleted when closed, finalized, or when the system exits.
protected  void finalize()
           
 
Methods inherited from class java.io.RandomAccessFile
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
 

Method Detail

createTemporaryFile

public static java.io.RandomAccessFile createTemporaryFile(java.lang.String prefix,
                                                           java.lang.String suffix,
                                                           java.io.File directory)
                                                    throws java.io.IOException
Creates a new writable temporary file that is deleted when closed, finalized, or when the system exits.
See Also:
File.createTempFile(java.lang.String, java.lang.String, java.io.File)

createTemporaryFile

public static java.io.RandomAccessFile createTemporaryFile(java.lang.String prefix,
                                                           java.lang.String suffix)
                                                    throws java.io.IOException
Creates a new writable temporary file that is deleted when closed, finalized, or when the system exits.
See Also:
File.createTempFile(java.lang.String, java.lang.String, java.io.File)

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.io.RandomAccessFile

finalize

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