inescID.util
Class FileTool

java.lang.Object
  extended byinescID.util.FileTool
Direct Known Subclasses:
FileEncryptionTool

public class FileTool
extends java.lang.Object

Title:

Description:

Copyright: Copyright (c) 2002

Company Inesc-ID


Field Summary
(package private)  java.io.FileWriter append_file
           
(package private)  java.io.LineNumberReader open_file
           
 
Constructor Summary
FileTool()
           
 
Method Summary
 void closeReadFile()
           
 void closeWriteFile()
           
static void copy(java.lang.String source, java.lang.String dest)
          Fast & simple file copy.
 void finalize()
           
 void initReadLine(java.lang.String file_name)
           
 void initWrite(java.lang.String file_name)
           
 java.lang.String readLine()
           
 java.lang.Object readObjectFromFile(java.lang.String file_name)
           
 java.lang.String readTextFile(java.lang.String file_name)
           
 void write(java.lang.String str)
           
 void writeLine(java.lang.String line)
           
 void writeObject2File(java.lang.String file_name, java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

open_file

java.io.LineNumberReader open_file

append_file

java.io.FileWriter append_file
Constructor Detail

FileTool

public FileTool()
Method Detail

writeObject2File

public void writeObject2File(java.lang.String file_name,
                             java.lang.Object obj)
                      throws java.io.FileNotFoundException,
                             java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

readObjectFromFile

public java.lang.Object readObjectFromFile(java.lang.String file_name)
                                    throws java.io.FileNotFoundException,
                                           java.lang.ClassNotFoundException,
                                           java.io.IOException
Throws:
java.io.FileNotFoundException
java.lang.ClassNotFoundException
java.io.IOException

readTextFile

public java.lang.String readTextFile(java.lang.String file_name)
                              throws java.io.FileNotFoundException,
                                     java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

initReadLine

public void initReadLine(java.lang.String file_name)
                  throws java.io.FileNotFoundException,
                         java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

readLine

public java.lang.String readLine()
                          throws java.io.FileNotFoundException,
                                 java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

initWrite

public void initWrite(java.lang.String file_name)
               throws java.io.FileNotFoundException,
                      java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

writeLine

public void writeLine(java.lang.String line)
               throws java.io.IOException
Throws:
java.io.IOException

write

public void write(java.lang.String str)
           throws java.io.IOException
Throws:
java.io.IOException

closeReadFile

public void closeReadFile()
                   throws java.lang.Throwable
Throws:
java.lang.Throwable

closeWriteFile

public void closeWriteFile()
                    throws java.lang.Throwable
Throws:
java.lang.Throwable

finalize

public void finalize()
              throws java.lang.Throwable
Throws:
java.lang.Throwable

copy

public static void copy(java.lang.String source,
                        java.lang.String dest)
                 throws java.io.IOException
Fast & simple file copy.

Throws:
java.io.IOException