pal.io
Class InputSource

java.lang.Object
  |
  +--java.io.Reader
        |
        +--java.io.FilterReader
              |
              +--java.io.PushbackReader
                    |
                    +--pal.io.InputSource

public class InputSource
extends java.io.PushbackReader

convenience class to open input streams linked to files, stdin, and strings


Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Method Summary
static InputSource openFile(java.lang.String name)
          open file for reading
static InputSource openStdIn()
          open standard input
static InputSource openString(java.lang.String input)
          "open" string for reading
 
Methods inherited from class java.io.PushbackReader
close, mark, markSupported, read, read, ready, reset, unread, unread, unread
 
Methods inherited from class java.io.FilterReader
skip
 
Methods inherited from class java.io.Reader
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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