org.openspml.v2.util
Class FileUtil

java.lang.Object
  extended byorg.openspml.v2.util.FileUtil

public class FileUtil
extends java.lang.Object


Nested Class Summary
static interface FileUtil.FileLineProcessor
           
 
Constructor Summary
FileUtil()
           
 
Method Summary
static java.lang.String readFile(java.io.File file)
           
static java.lang.String readFile(java.lang.String filename)
           
static void readFileAndProcessLines(java.io.File name, FileUtil.FileLineProcessor processor)
           
static byte[] readFileBytes(java.io.File file)
           
static void writeFile(java.lang.String filename, java.lang.String contents)
          Store the contents of a String in a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

readFileBytes

public static byte[] readFileBytes(java.io.File file)
                            throws java.io.IOException
Throws:
java.io.IOException

readFile

public static java.lang.String readFile(java.io.File file)
                                 throws java.io.IOException
Throws:
java.io.IOException

readFile

public static java.lang.String readFile(java.lang.String filename)
                                 throws java.io.IOException
Throws:
java.io.IOException

writeFile

public static void writeFile(java.lang.String filename,
                             java.lang.String contents)
                      throws java.io.IOException
Store the contents of a String in a file.

Throws:
java.io.IOException

readFileAndProcessLines

public static void readFileAndProcessLines(java.io.File name,
                                           FileUtil.FileLineProcessor processor)
                                    throws java.io.FileNotFoundException,
                                           java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException


Copyright © Sun Microsystems, Inc. All Rights Reserved.