@Override public void close() throws IOException {
  OutputStream stream=getStream();
  if (stream == null) {
    return;
  }
synchronized (stream) {
    stream.flush();
  }
}

@ Override public void close ( ) throws IOException { OutputStream stream = getStream ( ) ; if ( stream == null ) { return ; } synchronized ( stream ) { stream . flush ( ) ; } }
flush data to the stream .
