private boolean reachedEnd() {
    return (isCurrentSegmentDecrypted
            && currentSegmentNr == numberOfSegments - 1
            && plaintextSegment.remaining() == 0);
  }
Returns true if plaintextPositon is at the end of the file
and this has been verified, by decrypting the last segment.
java_src/src/main/java/com/google/crypto/tink/subtle/StreamingAeadSeekableDecryptingChannel.java