Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.25 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5.  
  6. package su.vistar.gps.cdsforward.core;
  7.  
  8. import java.io.IOException;
  9. import java.io.InputStream;
  10.  
  11. /**
  12.  *
  13.  * @author serg
  14.  */
  15. public class MyInputStream {
  16.  
  17.     private final InputStream is;
  18.  
  19.     public MyInputStream(InputStream is) {
  20.         if (is == null) {
  21.             throw new NullPointerException("is");
  22.         }
  23.  
  24.         this.is = is;
  25.     }
  26.  
  27.     public long skip(long n) throws IOException {
  28.         return is.skip(n);
  29.     }
  30.  
  31.     public synchronized void reset() throws IOException {
  32.         is.reset();
  33.     }
  34.  
  35.     public int read(byte[] b, int off, int len) throws IOException {
  36.         return is.read(b, off, len);
  37.     }
  38.  
  39.     public int read(byte[] b) throws IOException {
  40.         return is.read(b);
  41.     }
  42.  
  43.     public int read() throws IOException {
  44.         return is.read();
  45.     }
  46.  
  47.     public boolean markSupported() {
  48.         return is.markSupported();
  49.     }
  50.  
  51.     public synchronized void mark(int readlimit) {
  52.         is.mark(readlimit);
  53.     }
  54.  
  55.     public void close() throws IOException {
  56.         is.close();
  57.     }
  58.  
  59.     public int available() throws IOException {
  60.         return is.available();
  61.     }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement