home *** CD-ROM | disk | FTP | other *** search
/ Online Today 2000 January / Onto0100.iso / pc / JAVA / MSJAVX86.EXE / xmldso.cab / com / ms / xml / util / ByteSwapInputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-05  |  480 b   |  27 lines

  1. package com.ms.xml.util;
  2.  
  3. import java.io.IOException;
  4. import java.io.InputStream;
  5.  
  6. class ByteSwapInputStream extends InputStream {
  7.    // $FF: renamed from: in java.io.InputStream
  8.    private InputStream field_0;
  9.    private int byte1;
  10.  
  11.    public ByteSwapInputStream(InputStream var1) {
  12.       this.field_0 = var1;
  13.       this.byte1 = -2;
  14.    }
  15.  
  16.    public int read() throws IOException {
  17.       if (this.byte1 == -2) {
  18.          this.byte1 = this.field_0.read();
  19.          return this.byte1 == -1 ? -1 : this.field_0.read();
  20.       } else {
  21.          int var1 = this.byte1;
  22.          this.byte1 = -2;
  23.          return var1;
  24.       }
  25.    }
  26. }
  27.