org.simBio.util
Class FileHandler

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

public final class FileHandler
extends java.lang.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 java.lang.String DEFAULT_ENCODING
          default encoding
 
Method Summary
static java.io.File getBackup()
           
static java.io.File getFile(java.lang.String uri)
           
static java.io.File getNewFile(java.lang.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 java.lang.String DEFAULT_ENCODING
default encoding

See Also:
Constant Field Values
Method Detail

getNewFile

public static final java.io.File getNewFile(java.lang.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 java.io.File getBackup()
Returns:
Returns the backup.

getFile

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


Copyright © 2002-2008 Cell/Biodinamics simulation project. All Rights Reserved.