home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 May / PCWK5A99.ISO / Linuxwld / linuxwld.exe / IOStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-05-31  |  1.1 KB  |  47 lines

  1. import java.io.DataInputStream;
  2. import java.io.IOException;
  3.  
  4. class IOStream implements Streamable {
  5.    // $FF: renamed from: in java.io.DataInputStream
  6.    DataInputStream field_0;
  7.    boolean unicode = false;
  8.  
  9.    public void init(String var1, int var2) {
  10.    }
  11.  
  12.    public void setUnicode(boolean var1) {
  13.       this.unicode = var1;
  14.    }
  15.  
  16.    public IOStream(DataInputStream var1) {
  17.       this.field_0 = var1;
  18.    }
  19.  
  20.    public String connect() {
  21.       return null;
  22.    }
  23.  
  24.    public void send(String var1) {
  25.    }
  26.  
  27.    public String receive() throws IOException {
  28.       if (this.field_0 != null) {
  29.          String var1 = this.unicode ? this.field_0.readUTF() : this.field_0.readLine();
  30.          if (var1.endsWith("MODE para u+")) {
  31.             this.unicode = true;
  32.             var1 = ":SYSTEM privmsg user : *** Switched to UNICODE MODE: ";
  33.          }
  34.  
  35.          return var1;
  36.       } else {
  37.          return null;
  38.       }
  39.    }
  40.  
  41.    public String disconnect() throws IOException {
  42.       this.field_0.close();
  43.       this.field_0 = null;
  44.       return null;
  45.    }
  46. }
  47.