|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.stueckseln.buildtools.utils.FileHelper
public class FileHelper
A simple file helper class for reading an writing files Methods here may do the same stuff Apache Commons IO do, but requiring AC/IO for reading/writing a file in such a small tool is over loaded.
Field Summary | |
---|---|
static int |
BUFFER_SIZE
|
Constructor Summary | |
---|---|
FileHelper()
|
Method Summary | |
---|---|
static void |
readFile(java.io.File file,
java.lang.StringBuffer buf)
Read file into supplied StringBuffer |
static java.lang.String |
readFileToString(java.io.File file)
Read file and return as String |
static void |
writeFile(java.lang.StringBuffer buf,
java.io.File file)
Write a StringBuffer to a file |
static void |
writeFile(java.lang.String str,
java.io.File file)
Write a String to a file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BUFFER_SIZE
Constructor Detail |
---|
public FileHelper()
Method Detail |
---|
public static void readFile(java.io.File file, java.lang.StringBuffer buf) throws java.io.IOException
file
- file to read frombuf
- StringBuffer to write file contents to
java.io.IOException
public static java.lang.String readFileToString(java.io.File file) throws java.io.IOException
file
- file to read from
java.io.IOException
public static void writeFile(java.lang.String str, java.io.File file) throws java.io.IOException
str
- string to writefile
- File instance denoting a file to write to
java.io.IOException
public static void writeFile(java.lang.StringBuffer buf, java.io.File file) throws java.io.IOException
buf
- string to writefile
- File instance denoting a file to write to
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |