coins.driver
クラス TemporaryFileManager

java.lang.Object
  |
  +--coins.driver.TemporaryFileManager

public class TemporaryFileManager
extends java.lang.Object

Provides temporary file management facility.
A temporary file with any presix and suffix can be created.
More than one manager can work together at same time.


コンストラクタの概要
TemporaryFileManager()
          Constructs a new manager.
 
メソッドの概要
 void cleanupTemporaryFiles()
          Deletes all temporary files created by this manager.
 java.io.File createTemporaryFile()
          Creates a temporary file and returns its path name.
 java.io.File createTemporaryFile(java.lang.String suffix)
          Creates a temporary file with a specified suffix and returns its path name.
 java.io.File createTemporaryFile(java.lang.String prefix, java.lang.String suffix)
          Creates a temporary file with a specified prefix and suffix and returns its path name.
 java.util.Collection getTemporaryFiles()
          Returns a list of temporary files ever created by this manager.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

TemporaryFileManager

public TemporaryFileManager()
Constructs a new manager.

メソッドの詳細

cleanupTemporaryFiles

public void cleanupTemporaryFiles()
Deletes all temporary files created by this manager.


createTemporaryFile

public java.io.File createTemporaryFile()
                                 throws java.io.IOException
Creates a temporary file and returns its path name.

戻り値:
a temporary file path name.
例外:
java.io.IOException - - failed to create a file.

createTemporaryFile

public java.io.File createTemporaryFile(java.lang.String suffix)
                                 throws java.io.IOException
Creates a temporary file with a specified suffix and returns its path name.

パラメータ:
suffix - a suffix.
戻り値:
a temporary file path name.
例外:
java.io.IOException - - failed to create a file.

createTemporaryFile

public java.io.File createTemporaryFile(java.lang.String prefix,
                                        java.lang.String suffix)
                                 throws java.lang.IllegalArgumentException,
                                        java.io.IOException
Creates a temporary file with a specified prefix and suffix and returns its path name. The prefix length must be three or more.

パラメータ:
prefix - a prefix.
suffix - a suffix.
戻り値:
a temporary file path name.
例外:
java.lang.IllegalArgumentException - - prefix length is short.
java.io.IOException - - failed to create a file.

getTemporaryFiles

public java.util.Collection getTemporaryFiles()
Returns a list of temporary files ever created by this manager. The list is a Collection of Files.

戻り値:
a temporary file path name list.