org.embl.ebi.escience.utils
Class SimpleFile

java.lang.Object
  extended by org.embl.ebi.escience.utils.SimpleFile

public class SimpleFile
extends java.lang.Object

Simple file reading

Author:
Stian Soiland

Constructor Summary
SimpleFile()
           
 
Method Summary
static java.lang.String readFile(java.io.File file)
          Read a file and return the full content.
static java.lang.String readFile(java.lang.String filename)
          Read a file and return the full content.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleFile

public SimpleFile()
Method Detail

readFile

public static java.lang.String readFile(java.lang.String filename)
                                 throws java.io.IOException
Read a file and return the full content.

Parameters:
filename - Path to file to be opened.
Returns:
The full file content, lines separated by '\n'
Throws:
java.io.IOException - If file is not found or cannot be read.

readFile

public static java.lang.String readFile(java.io.File file)
                                 throws java.io.IOException
Read a file and return the full content.

Parameters:
file - File to be opened
Returns:
The full file content, lines separated by '\n'
Throws:
java.io.IOException - If file is not found or cannot be read.