public static void printRawLines(PrintWriter writer,String msg){
  int nl;
  while ((nl=msg.indexOf('\n')) != -1) {
    writer.println(msg.substring(0,nl));
    msg=msg.substring(nl + 1);
  }
  if (msg.length() != 0)   writer.println(msg);
}

public static void printRawLines ( PrintWriter writer , String msg ) { int nl ; while ( ( nl = msg . indexOf ( '\n' ) ) != - 1 ) { writer . println ( msg . substring ( 0 , nl ) ) ; msg = msg . substring ( nl + 1 ) ; } if ( msg . length ( ) != 0 ) writer . println ( msg ) ; }
print the text of a message , translating newlines appropriately for the platform .
