home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 27 / CDROM27.iso / share / wnt / jig / data1.cab / Program_Executable_Files / lib / jig.jar / PrintThread.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-08-19  |  1.2 KB  |  39 lines

  1. import java.io.DataInputStream;
  2. import java.io.EOFException;
  3. import java.io.IOException;
  4.  
  5. class PrintThread extends Thread {
  6.    Monolog output;
  7.    DataInputStream dis;
  8.  
  9.    PrintThread(String var1, DataInputStream var2, Monolog var3) {
  10.       super(var1);
  11.       this.dis = var2;
  12.       this.output = var3;
  13.    }
  14.  
  15.    public void run() {
  16.       try {
  17.          while(true) {
  18.             String var1 = this.dis.readLine();
  19.             if (var1 == null) {
  20.                return;
  21.             }
  22.  
  23.             this.output(var1);
  24.          }
  25.       } catch (EOFException var2) {
  26.       } catch (IOException var3) {
  27.          this.output(BrowserOptions.messages.getString("IOException"));
  28.       }
  29.    }
  30.  
  31.    private void output(String var1) {
  32.       if (this.output == null) {
  33.          System.out.println(var1);
  34.       } else {
  35.          this.output.output(var1 + "\n");
  36.       }
  37.    }
  38. }
  39.