home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / java / io / InputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-04-23  |  1.0 KB  |  63 lines

  1. package java.io;
  2.  
  3. public abstract class InputStream {
  4.    public abstract int read() throws IOException;
  5.  
  6.    public int read(byte[] var1) throws IOException {
  7.       return this.read(var1, 0, var1.length);
  8.    }
  9.  
  10.    public int read(byte[] var1, int var2, int var3) throws IOException {
  11.       if (var3 <= 0) {
  12.          return 0;
  13.       } else {
  14.          int var4 = this.read();
  15.          if (var4 == -1) {
  16.             return -1;
  17.          } else {
  18.             var1[var2] = (byte)var4;
  19.             int var5 = 1;
  20.  
  21.             try {
  22.                for(; var5 < var3; ++var5) {
  23.                   var4 = this.read();
  24.                   if (var4 == -1) {
  25.                      break;
  26.                   }
  27.  
  28.                   if (var1 != null) {
  29.                      var1[var2 + var5] = (byte)var4;
  30.                   }
  31.                }
  32.             } catch (IOException var6) {
  33.             }
  34.  
  35.             return var5;
  36.          }
  37.       }
  38.    }
  39.  
  40.    public long skip(long var1) throws IOException {
  41.       byte[] var3 = new byte[(int)(var1 & -268435457L)];
  42.       return (long)this.read(var3);
  43.    }
  44.  
  45.    public int available() throws IOException {
  46.       return 0;
  47.    }
  48.  
  49.    public void close() throws IOException {
  50.    }
  51.  
  52.    public synchronized void mark(int var1) {
  53.    }
  54.  
  55.    public synchronized void reset() throws IOException {
  56.       throw new IOException("mark/reset not supported");
  57.    }
  58.  
  59.    public boolean markSupported() {
  60.       return false;
  61.    }
  62. }
  63.