@Override
  public int read(byte[] b, int off, int len) throws IOException {
    if (len == 0) {
      return 0;
    }
    int result = read();
    if (result == -1) {
      return -1;
    }
    b[off] = (byte) result;
    return 1;
  }
We override this because the default always fills b[] but this is not guaranteed by the
interface.
java_src/src/main/java/com/google/crypto/tink/internal/SlowInputStream.java