public void inlinePrint(Object o) {
    if(inline.length() > 0) {
      inline.append(SEPARATOR);
    }
    // remove newlines
    String str = o.toString().replace(NEWLINE, " ");
    // escaping
    str = str.replace("\\", "\\\\").replace("\"", "\\\"");
    // when needed, add quotes.
    if(str.contains(SEPARATOR)) {
      inline.append('"').append(str).append('"');
    }
    else {
      inline.append(str);
    }
  }
public void inlinePrint ( Object o ) { if ( inline . length ( ) > 0 ) { inline . append ( SEPARATOR ) ; } String str = o . toString ( ) . replace ( NEWLINE , " " ) ; str = str . replace ( "\\" , "\\\\" ) . replace ( "\"" , "\\\"" ) ; if ( str . contains ( SEPARATOR ) ) { inline . append ( '"' ) . append ( str ) . append ( '"' ) ; } else { inline . append ( str ) ; } }
Print data into the inline part of the file. Data is sanitized: newlines
are replaced with spaces, and text containing separators is put in quotes.
Quotes and escape characters are escaped.

@param o object to print