home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / DominoDesignerDominoDesignerDataHtml / NCSO.cab / com / ibm / sslight / SSLInputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-16  |  921 b   |  49 lines

  1. package com.ibm.sslight;
  2.  
  3. import java.io.IOException;
  4. import java.io.InputStream;
  5.  
  6. public class SSLInputStream extends InputStream {
  7.    private byte[] one_byte;
  8.    // $FF: renamed from: rl com.ibm.sslight.SSLRecordLayer
  9.    private SSLRecordLayer field_0;
  10.  
  11.    SSLInputStream(SSLRecordLayer var1) {
  12.       this.field_0 = var1;
  13.       this.one_byte = new byte[1];
  14.    }
  15.  
  16.    public void close() throws IOException {
  17.       if (this.field_0 == null) {
  18.          throw new IOException();
  19.       } else {
  20.          this.field_0.conn.close();
  21.          this.field_0 = null;
  22.       }
  23.    }
  24.  
  25.    public int read(byte[] var1) throws IOException {
  26.       return this.read(var1, 0, var1.length);
  27.    }
  28.  
  29.    public synchronized int read() throws IOException {
  30.       return this.read(this.one_byte, 0, 1) == -1 ? -1 : this.one_byte[0] & 255;
  31.    }
  32.  
  33.    public synchronized int read(byte[] var1, int var2, int var3) throws IOException {
  34.       if (this.field_0 != null && var1 != null && var3 > 0) {
  35.          return this.field_0.read(var1, var2, var3);
  36.       } else {
  37.          throw new IOException();
  38.       }
  39.    }
  40.  
  41.    public int available() throws IOException {
  42.       if (this.field_0 == null) {
  43.          throw new IOException();
  44.       } else {
  45.          return this.field_0.available();
  46.       }
  47.    }
  48. }
  49.