public boolean finish(){
  if (!started)   return false;
  boolean ok=true;
  started=false;
  try {
    out.write(0x3b);
    out.flush();
    if (closeStream) {
      out.close();
    }
  }
 catch (  IOException e) {
    ok=false;
  }
  return ok;
}

public boolean finish ( ) { if ( ! started ) return false ; boolean ok = true ; started = false ; try { out . write ( 0x3b ) ; out . flush ( ) ; if ( closeStream ) { out . close ( ) ; } } catch ( IOException e ) { ok = false ; } return ok ; }
flushes any pending data and closes output file . if writing to an outputstream , the stream is not closed .
