@Override
    public synchronized int read(byte[] b, int off, int len) {
      return super.read(b, off, min(len, maxChunkSize));
    }
Implements a ByteArrayInputStream that returns only small chunks for testing.
java_src/src/main/java/com/google/crypto/tink/testing/StreamingTestUtil.java