Package pal.io

Class InputSource

All Implemented Interfaces:
Closeable, AutoCloseable, Readable

public class InputSource extends 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 Details

    • openFile

      public static InputSource openFile(String name) throws FileNotFoundException
      open file for reading
      Parameters:
      name - file name
      Returns:
      input stream
      Throws:
      FileNotFoundException
    • openStdIn

      public static InputSource openStdIn()
      open standard input
      Returns:
      input stream
    • openString

      public static InputSource openString(String input)
      "open" string for reading
      Parameters:
      input - string serving as source
      Returns:
      input stream