XCMS Toolkit

jtools
Class TextFile

java.lang.Object
  extended by jtools.TextFile

public class TextFile
extends java.lang.Object

Provides support for storing text in a disk file.

Version:
1.00 - 2006/02/10
Author:
support@phillipgriffin.com

Constructor Summary
TextFile(java.lang.String fileName)
          Constructor for TextFile with a parameter that specifies the disk file where text is to be read from and written to.
 
Method Summary
 java.lang.String readAll()
          Reads the entire contents of a disk file into a String.
 void writeAll(java.lang.String s)
          Writes an entire String to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFile

public TextFile(java.lang.String fileName)
         throws java.io.IOException
Constructor for TextFile with a parameter that specifies the disk file where text is to be read from and written to.

Parameters:
fileName - a file pathname string
Throws:
java.io.IOException
Method Detail

readAll

public java.lang.String readAll()
                         throws java.io.IOException
Reads the entire contents of a disk file into a String.

Returns:
a String object containing an entire file
Throws:
java.io.IOException

writeAll

public void writeAll(java.lang.String s)
              throws java.io.IOException
Writes an entire String to disk.

Parameters:
s - a string of data to be written to disk
Throws:
java.io.IOException

XCMS Toolkit


Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.