pal.io
Class InputSource
java.lang.Object
java.io.Reader
java.io.FilterReader
java.io.PushbackReader
pal.io.InputSource
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Readable
public class InputSource
- extends java.io.PushbackReader
convenience class to open input streams
linked to files, stdin, and strings
- Version:
- $Id: InputSource.java,v 1.4 2001/07/13 14:39:13 korbinian Exp $
- Author:
- Korbinian Strimmer
Fields inherited from class java.io.FilterReader |
in |
Fields inherited from class java.io.Reader |
lock |
Methods inherited from class java.io.PushbackReader |
close, mark, markSupported, read, read, ready, reset, skip, unread, unread, unread |
Methods inherited from class java.io.Reader |
read, read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
openFile
public static InputSource openFile(java.lang.String name)
throws java.io.FileNotFoundException
- open file for reading
- Parameters:
name
- file name
- Returns:
- input stream
- Throws:
java.io.FileNotFoundException
openStdIn
public static InputSource openStdIn()
- open standard input
- Returns:
- input stream
openString
public static InputSource openString(java.lang.String input)
- "open" string for reading
- Parameters:
input
- string serving as source
- Returns:
- input stream