|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectio.FileHandler
public class FileHandler
A class for dealing with file operations. Files can be loaded into
memory as a String or a DataInputStream.
Hints
"file:///root1/filename.ext"
"file:///c:/filename.ext"
| Constructor Summary | |
|---|---|
FileHandler()
|
|
| Method Summary | |
|---|---|
static boolean |
fileExists(java.lang.String strResource)
Returns true if a file exists |
static java.lang.String |
fileGet(java.lang.String strResource)
Returns a file represented as a string |
static java.io.DataInputStream |
fileGetAsStream(java.lang.String strResource)
Returns a file represented as a DataInputStream |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileHandler()
| Method Detail |
|---|
public static java.lang.String fileGet(java.lang.String strResource)
throws java.io.IOException
strResource - the file to load
java.io.IOException - thrown if file can not be accessed
public static java.io.DataInputStream fileGetAsStream(java.lang.String strResource)
throws java.io.IOException
strResource - the file to load
java.io.IOException - thrown if file can not be accessedpublic static boolean fileExists(java.lang.String strResource)
true if a file exists
strResource - the file to check
true if the file does existfalse if the file does NOT exist
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||