Class BoundedInputStream

java.lang.Object
java.io.InputStream
org.refcodes.io.BoundedInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class BoundedInputStream extends InputStream
A BoundedInputStream decorates an InputStream and restricts reading bytes from the InputStream decoratee up to a given total number of bytes (bounds). In case the total number of bytes readable has been exceeded then an according IOException is thrown.