FileDocCategorySizeDatePackage
FibonacciConsumer.javaAPI DocExample537Sat Feb 04 09:03:24 GMT 2006None

FibonacciConsumer

public class FibonacciConsumer extends Thread

Fields Summary
private DataInputStream
theInput
Constructors Summary
public FibonacciConsumer(InputStream in)

    theInput = new DataInputStream(in);
  
Methods Summary
public voidrun()


    try {
      while (true) {
        System.out.println(theInput.readInt());
      }
    }
    catch (IOException ex) {
      if (ex.getMessage().equals("Pipe broken")
        || ex.getMessage().equals("Write end dead")) {
        // normal termination
        return;
      }
      ex.printStackTrace();
    }