@Override
	public void write(final int b) throws IOException {
		switch (b) {
			case '\r' -> {
				this.out.write('\r');
				this.out.write('\n');
				this.startOfLine = true;
				this.statusLast = LAST_WAS_CR;
			}
			case '\n' -> {
				if (this.statusLast != LAST_WAS_CR) {
					this.out.write('\r');
					this.out.write('\n');
					this.startOfLine = true;
				}
				this.statusLast = LAST_WAS_LF;
			}
			default -> {
				// we're no longer at the start of a line
				this.out.write(b);
				this.startOfLine = false;
				this.statusLast = LAST_WAS_OTHER;
			}
		}
	}
Writes a byte to the stream Fixes any naked CR or LF to the RFC 2821 mandated
CFLF pairing.

@param b the byte to write

@throws IOException if an error occurs writing the byte
src/main/java/de/gessnerfl/fakesmtp/smtp/io/CRLFOutputStream.java