org.simBio.util
Class FileHandler

java.lang.Object
  extended by org.simBio.util.FileHandler

public final class FileHandler
extends Object

The tility class for file handling.

Version:
$Log: FileHandler.java,v $ Revision 1.2 2006/07/04 05:52:24 chiakioka changed log messages Revision 1.1 2005/11/01 06:32:39 mikaelwing First version of simBio hosted on sourceforge, version 0.3 Revision 1.3 2005/10/12 00:52:27 sarai debugging update Revision 1.2 2005/09/16 06:22:06 sarai getFile is moved to FileHandler
Author:
Nobuaki Sarai

Field Summary
static String DEFAULT_ENCODING
          default encoding
 
Method Summary
static File getBackup()
           
static File getFile(String uri)
           
static File getNewFile(String uri)
          get new File, the file, if already exist, will be renamed to the backup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENCODING

public static final String DEFAULT_ENCODING
default encoding

See Also:
Constant Field Values
Method Detail

getNewFile

public static final File getNewFile(String uri)
get new File, the file, if already exist, will be renamed to the backup.
file nameに存在しないdirectoryが含まれているときはdirectoryを作成する。 fileが存在するときは、それを*.bak[number].*にrenameすることを試みる。 失敗したら、新しいfile nameで作成したFileを返す。

Parameters:
uri - file name to be a new File
Returns:
new File

getBackup

public static final File getBackup()
Returns:
Returns the backup.

getFile

public static final File getFile(String uri)
Parameters:
uri - file name
Returns:
file parent directory will be made.


Copyright © 2005 Cell/Biodinamics simulation project. All Rights Reserved.