FileDocCategorySizeDatePackage
StreamPrinter.javaAPI DocExample589Sun Mar 28 19:05:44 BST 1999com.macfaq.io

StreamPrinter

public class StreamPrinter extends Object

Fields Summary
InputStream
theInput
Constructors Summary
public StreamPrinter(InputStream in)

    theInput = in;
  
Methods Summary
public static voidmain(java.lang.String[] args)

    StreamPrinter sp = new StreamPrinter(System.in);
    sp.print();
  
public voidprint()


    try {
      while (true) {
        int datum = theInput.read();
        if (datum  == -1) break;
        System.out.println(datum);
      }
    }
    catch (IOException e) {
      System.err.println("Couldn't read from System.in!");
    }