code: protected void appendEscapedAndQuoted(final StringBuilder sb, final String value) {
  		boolean foundLineBreak = false;
  
  		if (sb.length() > 0) {
  			sb.append(DELIMITER);
  		}
  
  		sb.append(CSV_QUOTE);
  		if (value != null) {
  			for (int i = 0, len = value.length(); i < len; ++i) {
  				char c = value.charAt(i);
  				switch (c) {
  					case CSV_QUOTE:
  						if (foundLineBreak) {
  							foundLineBreak = false;
  							sb.append(' ');
  						}
  						sb.append(c); // escape double quote, i. e. add quote character again
  						break;
  					case '\r':
  					case '\n':
  						foundLineBreak = true;
  						continue;
  					default:
  						if (foundLineBreak) {
  							sb.append(' ');
  							foundLineBreak = false;
  						}
  						break;
  				}
  				sb.append(c);
  			}
  		}
  		sb.append(CSV_QUOTE);
  	}
docs: <p>
  Encloses the given value into double-quotes. Quote characters are escaped with an additional quote character. Line breaks
  are replaced with a space character. Multiple line breaks are collapsed to a single space.
  </p>
  <p>
  If the specified StringBuilder is non-empty, a semi-colon is appended first.
  </p>
  
  @param sb
  the string buffer the escaped and quoted result is appended to
  @param value
  the input string to transform