Project Wonder 5.0

er.woinstaller.io
Class BoundedInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by er.woinstaller.io.BoundedInputStream
All Implemented Interfaces:
java.io.Closeable

public class BoundedInputStream
extends java.io.InputStream

InputStream that delegates requests to the underlying RandomAccessFile, making sure that only bytes from a certain range can be read.


Constructor Summary
BoundedInputStream(java.io.InputStream inputStream, long start, long remaining)
           
 
Method Summary
 int read()
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundedInputStream

public BoundedInputStream(java.io.InputStream inputStream,
                          long start,
                          long remaining)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.