SciLib.Util
Class fileProcessing

java.lang.Object
  extended by SciLib.Util.fileProcessing

public final class fileProcessing
extends java.lang.Object

This class contains some methods to read and write a text file.


Constructor Summary
fileProcessing()
           
 
Method Summary
static boolean exists(java.lang.String fileName)
          check if a file exists
static java.lang.String getReadFileName(java.awt.Frame parent)
          get the file name for reading from the FileDialog
static java.lang.String getWriteFileName(java.awt.Frame parent)
          get the file name for writing from the FileDialog
static java.lang.String read(java.lang.String fileName)
          read data from a file and store it in a string
static void write(java.lang.String fileName, java.lang.String str)
          write a data string to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

fileProcessing

public fileProcessing()
Method Detail

write

public static final void write(java.lang.String fileName,
                               java.lang.String str)
write a data string to a file


read

public static final java.lang.String read(java.lang.String fileName)
read data from a file and store it in a string


getReadFileName

public static java.lang.String getReadFileName(java.awt.Frame parent)
get the file name for reading from the FileDialog

Parameters:
parent - A frame window
Returns:
A String

getWriteFileName

public static java.lang.String getWriteFileName(java.awt.Frame parent)
get the file name for writing from the FileDialog

Parameters:
parent - A frame window
Returns:
A String

exists

public static boolean exists(java.lang.String fileName)
check if a file exists

Parameters:
fileName - the file name, String
Returns:
true or false, boolean