proper.io
Class TextFile

java.lang.Object
  extended by proper.io.TextFile

public class TextFile
extends java.lang.Object

This class provides a simple frontend for line-oriented files.

Version:
$Revision: 1.2 $
Author:
FracPete

Constructor Summary
TextFile(java.lang.String filename)
          initializes the object
 
Method Summary
 java.lang.String getFilename()
          returns the filename
 java.util.Vector load()
          returns a vector with the lines of the file
static java.util.Vector load(java.lang.String filename)
          returns a vector with the lines of the specified file
static boolean save(java.lang.String filename, java.util.Vector lines)
          saves the given vector with strings to the specified file
static boolean save(java.lang.String filename, java.util.Vector lines, boolean append)
          saves the given vector with strings to the specified file, can be appended or not
 boolean save(java.util.Vector lines)
          saves the given lines to the file
 boolean save(java.util.Vector lines, boolean append)
          saves the given lines to the file, can be appended or not
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFile

public TextFile(java.lang.String filename)
initializes the object

Method Detail

getFilename

public java.lang.String getFilename()
returns the filename


load

public java.util.Vector load()
returns a vector with the lines of the file


load

public static java.util.Vector load(java.lang.String filename)
returns a vector with the lines of the specified file


save

public boolean save(java.util.Vector lines)
saves the given lines to the file


save

public static boolean save(java.lang.String filename,
                           java.util.Vector lines)
saves the given vector with strings to the specified file


save

public boolean save(java.util.Vector lines,
                    boolean append)
saves the given lines to the file, can be appended or not


save

public static boolean save(java.lang.String filename,
                           java.util.Vector lines,
                           boolean append)
saves the given vector with strings to the specified file, can be appended or not