@Override
  public int read() throws IOException {
    if (pos >= result.length) {
      return -1;
    }
    int r = result[pos] & 0xFF;
    pos++;
    return r;
  }
An implementation of ByteArrayInputStream which returns each element separately. Used for testing
only.
java_src/src/main/java/com/google/crypto/tink/internal/SlowInputStream.java