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