home *** CD-ROM | disk | FTP | other *** search
/ Online Today 2000 January / Onto0100.iso / pc / JAVA / MSJAVX86.EXE / xmldso.cab / XML4IE3.cab / com / ms / xml / util / ByteSwapInputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-10-10  |  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 int read() throws IOException {
  12.       if (this.byte1 == -2) {
  13.          this.byte1 = this.field_0.read();
  14.          return this.byte1 == -1 ? -1 : this.field_0.read();
  15.       } else {
  16.          int var1 = this.byte1;
  17.          this.byte1 = -2;
  18.          return var1;
  19.       }
  20.    }
  21.  
  22.    public ByteSwapInputStream(InputStream var1) {
  23.       this.field_0 = var1;
  24.       this.byte1 = -2;
  25.    }
  26. }
  27.