private boolean nextLine(final CharCursor chars, final CharAppender line)
			throws IOException
		{
			boolean quoted = false;
			boolean escaped = false;
			boolean eol = false;

			int next = -2;
			int i = 0;

			while (next >= 0 || (i = chars.next()) != -1) {
				final char current = next != -2 ? (char)next : (char)i;
				next = -2;

				if (isLineBreak(current)) {
					if (quoted) {
						line.append(current);
					} else {
						eol = true;
					}
				} else if (current == quote.value) {
					if (quoted) {
						if (!escaped && (next = chars.next()) == quote.value) {
							escaped = true;
						} else {
							if (escaped) {
								escaped = false;
							} else {
								quoted = false;
							}
						}
					} else {
						quoted = true;
					}
					line.append(current);
				} else {
					line.append(current);
				}

				if (eol) {
					eol = false;
					if (line.nonEmpty()) {
						return true;
					}
				}
			}

			if (quoted) {
				throw new IllegalArgumentException(
					"Unbalanced quote character: '%s'."
						.formatted(toString(line))
				);
			}
			return line.nonEmpty();
		}
Reads all CSV lines from the given {@code reader}.

@apiNote
This method must be used within a try-with-resources statement or
similar control structure to ensure that the stream's open file is
closed promptly after the stream's operations have completed.

@param readable the readable from which to read the CSV content
@return the CSV lines from the file as a {@code Stream}
jenetics.ext/src/main/java/io/jenetics/ext/util/CsvSupport.java