|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoj.util.FileTools
public class FileTools
A small utility class that contains methods for handling files.
Constructor Summary | |
---|---|
FileTools()
|
Method Summary | |
---|---|
static java.lang.String |
readFile2String(java.lang.String filename)
Reads a file into a String using cpdetector for code page detection. |
static java.lang.String |
readFile2String(java.lang.String filename,
java.nio.charset.Charset cs)
Reads a file into a String using the provided charset. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileTools()
Method Detail |
---|
public static java.lang.String readFile2String(java.lang.String filename)
String
using cpdetector for code page detection.
filename
- name of the file to read into a String
String
containing the given file (line breaks preserved)public static java.lang.String readFile2String(java.lang.String filename, java.nio.charset.Charset cs)
String
using the provided charset.
filename
- name of the file to read into a String
cs
- the Charset
to use when reading the file
String
containing the given file (line breaks preserved)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |