class StrictlyBoundedInputStream extends InputStream {

    @Override
    public int read() throws IOException {
        int i = in.read();
        if (i >= 0) {
            incrementCounter(1);
        }
        return i;
    }

    public  StrictlyBoundedInputStream(InputStream in, long maxSize);

}