@Override
    public void close() throws IOException {
      isopen = false;
    }
keeps track whether the channel is still open.
java_src/src/main/java/com/google/crypto/tink/testing/StreamingTestUtil.java