private static void processCharacterAfterCarriageReturn(ReadState state, int inChar) throws TerminationException {
		switch (inChar) {
			case LF -> { // LF without a preceding CR
				if (state.tainted != -1) {
					throw new TerminationException("\"bare\" CR or LF in data stream", state.tainted);
				}
				state.isComplete = true;
			}
			case EOF -> state.isPrematureEol = true;
			case CR -> { // we got two (or more) CRs in a row
				if (state.tainted == -1) {
					state.tainted = state.lineBuilder.length();
				}
				state.lineBuilder.append(CR);
			}
			default -> { // we got some other character following a CR
				if (state.tainted == -1) {
					state.tainted = state.lineBuilder.length();
				}
				state.lineBuilder.append(CR);
				state.lineBuilder.append((char) inChar);
				state.crJustReceived = false;
			}
		}
	}
Read a line of text which is terminated by CRLF. The concluding CRLF
characters are not returned with the String, but if either CR or LF appears
in the text in any other sequence it is returned in the String like any other
character. Some characters at the end of the stream may be lost if they are
in a "line" not terminated by CRLF.

@return either a String containing the contents of a line which must end with
        CRLF, or null if the end of the stream has been reached, possibly
        discarding some characters in a line not terminated with CRLF.
@throws IOException if an I/O error occurs.
src/main/java/de/gessnerfl/fakesmtp/smtp/io/CRLFTerminatedReader.java