util
Class FileLibrary
java.lang.Object
|
+--util.FileLibrary
- public class FileLibrary
- extends Object
FileLibrary
contains some helpful methods to handle
reading from a file.
Writing to a file will be added shortly.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileLibrary
public FileLibrary()
getFileInputStream
public static FileInputStream getFileInputStream(String sFile)
getFileInputStream
creates a FileInputStream from
a given filename,
- Parameters:
sFile
- a String
value- Returns:
- a
FileInputStream
value
getFileOutputStream
public static FileOutputStream getFileOutputStream(String sFile)
- Gets a FileOutputStream from a given file name.
- Parameters:
sFile
- a String
value- Returns:
- a
FileOutputStream
value
getBufferedInputStream
public static BufferedInputStream getBufferedInputStream(String sFile)
- Gets a BufferedInputStream from a given file name.
- Parameters:
sFile
- a String
value- Returns:
- a
BufferedInputStream
value
getBufferedOutputStream
public static BufferedOutputStream getBufferedOutputStream(String sFile)
- Gets a BufferedOutputStream from a given file name.
- Parameters:
sFile
- a String
value- Returns:
- a
BufferedOutputStream
value
getInputStreamReader
public static InputStreamReader getInputStreamReader(String sFile)
getInputStreamReader
creates an InputStreamReader from
a given filename.
- Parameters:
sFile
- a String
value of the name of the
file, including the full path.- Returns:
- an
InputStreamReader
value - See Also:
getFileInputStream(String)
getBufferedReader
public static BufferedReader getBufferedReader(String sFile)
getBufferedReader
creates a BufferedReader from a
given filename.
- Parameters:
sFile
- a String
value of the name of the
file, including the full path.- Returns:
- a
BufferedReader
value - See Also:
getInputStreamReader(String)
getStreamTokenizer
public static StreamTokenizer getStreamTokenizer(String fileName)
getStreamTokenizer
creates a StreamTokenizer from a
given filename.
- Parameters:
fileName
- a String
value of the name of the
file, including the full path.- Returns:
- a
StreamTokenizer
value - See Also:
getBufferedReader(String)
getURL
public static URL getURL(String fileName)
getURL
creates a URL from a given filename.
- Parameters:
fileName
- a String
value of the name of the
file, including the full path.- Returns:
- a
URL
value