Overview  Package   Class  Tree  Index 

be.lassi.util
Class Contents

java.lang.Object
  extended by be.lassi.util.Contents

public class Contents
extends java.lang.Object

Helper class for reading and writing the contents of file with given name as one string.


Constructor Summary
Contents(java.lang.String filename)
          Constructs new instance.
 
Method Summary
 java.lang.String getString()
          Gets the entire contents of the file in one string.
 void write(java.lang.String string)
          Writes given string to file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Contents

public Contents(java.lang.String filename)
Constructs new instance.

Parameters:
fileName - name of the file to be read or written
Method Detail

getString

public java.lang.String getString()
                           throws java.io.IOException
Gets the entire contents of the file in one string.

Returns:
the file contents
Throws:
java.io.IOException - if problem

write

public void write(java.lang.String string)
           throws java.io.IOException
Writes given string to file.

Parameters:
string - the string to be written
Throws:
java.io.IOException - if problem

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2