Code example for InputStream

Methods: reset

0
        return read;
    } 
 
    @Override 
    public synchronized void reset() throws IOException { 
        parent.reset();
    } 
 
    @Override 
    public long skip(long n) throws IOException {
        long skipped = parent.skip(n);
        position += skipped;
        return skipped;
    } 
 
    public void seek(long n) throws IOException {
        long diff = n - position;
 
        if (diff < 0) {
            throw new IOException("Can't seek backwards");
        }