private void setDecryptionErrorOccured() {
    decryptionErrorOccured = true;
    plaintextSegment.limit(0);
  }
Reads the header of the ciphertext and sets headerRead = true.

@throws IOException when an exception occurs while reading from {@code in} or when the header
    is too short.
java_src/src/main/java/com/google/crypto/tink/subtle/StreamingAeadDecryptingStream.java