docs: public static String make512Safe(StringBuffer input, String newline) {
  		StringBuilder result = new StringBuilder();
  		String content = input.toString();
  		String rest = content;
  		while (!rest.isEmpty()) {
  			if (rest.contains("\n")) {
  				String line = rest.substring(0, rest.indexOf("\n"));
  				rest = rest.substring(rest.indexOf("\n") + 1);
  				if (line.length() > 1 && line.charAt(line.length() - 1) == '\r')
  					line = line.substring(0, line.length() - 1);
  				append512Safe(line, result, newline);
  			} else {
  				append512Safe(rest, result, newline);
  				break;
  			}
  		}
  		return result.toString();
  	}