public void flush(){
  if (ps != null) {
    if (lineBuffer.length() != 0) {
      flushLine(false);
    }
    ps.flush();
  }
}

public void flush ( ) { if ( ps != null ) { if ( lineBuffer . length ( ) != 0 ) { flushLine ( false ) ; } ps . flush ( ) ; } }
flushes the stream . this is done by terminating the current line if it is not at position 0 and then flushing the underlying output stream .
