net.exegetic.markout
Class FileIO

java.lang.Object
  extended by net.exegetic.markout.FileIO

public class FileIO
extends java.lang.Object

A collection of simple file IO methods. Honestly, this class exists mainly just to support some test classes, but it may be of general use. Yes, we are truly that lazy.

Author:
Nathan Winant

Constructor Summary
FileIO()
           
 
Method Summary
 java.lang.String readFile(java.lang.String filePath)
          Read the contents of a file to a String.
 void writeFile(java.lang.String filePath, java.lang.String content)
          Write the contents of a String to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileIO

public FileIO()
Method Detail

readFile

public java.lang.String readFile(java.lang.String filePath)
                          throws java.io.IOException
Read the contents of a file to a String.

Parameters:
filePath - Path of the input file
Returns:
Contents of file as a String
Throws:
java.io.IOException

writeFile

public void writeFile(java.lang.String filePath,
                      java.lang.String content)
               throws java.io.IOException
Write the contents of a String to a file.

Parameters:
filePath - Path of the output file
content - Content to be written
Throws:
java.io.IOException


Copyright © 2007 das markout Projekt. All Rights Reserved.