public void close(){
  flush();
  try {
    out.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

public void close ( ) { flush ( ) ; try { out . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
closes and flushes the binary output stream . once it is closed , bits can no longer be written .
