@Override
	public int read(final byte[] b, final int off, final int len) throws IOException {
		if (b == null) {
			throw new NullPointerException();
		}
		if (off < 0 || off > b.length || len < 0 || off + len > b.length || off + len < 0) {
			throw new IndexOutOfBoundsException();
		}
		if (len == 0) {
			return 0;
		}

		int c = this.read();
		if (c == -1) {
			return -1;
		}
		b[off] = (byte) c;

		int i = 1;

		for (; i < len; i++) {
			c = this.read();
			if (c == -1) {
				break;
			}
			b[off + i] = (byte) c;
		}

		return i;
	}
Read through the stream, checking for '\r\n.'

@param b   the byte array into which the bytes will be read
@param off the offset into the byte array where the bytes will be inserted
@param len the maximum number of bytes to be read off the stream
@return the number of bytes read
src/main/java/de/gessnerfl/fakesmtp/smtp/io/DotUnstuffingInputStream.java