Package 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.AutoCloseable
,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
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InputSource
openFile(java.lang.String name)
open file for readingstatic InputSource
openStdIn()
open standard inputstatic InputSource
openString(java.lang.String input)
"open" string for reading
-
-
-
Method Detail
-
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
-
-