@Override
    public SeekableByteChannel truncate(long size) {
      throw new NonWritableChannelException();
    }
Implements a SeekableByteChannel for testing.

<p>The implementation is backed by a ByteBuffer.
java_src/src/main/java/com/google/crypto/tink/testing/StreamingTestUtil.java