/**
  * Flushes this data output stream. This forces any buffered output bytes to be written out to the
  * stream.
  *
  * <p>The <code>flush</code> method of <code>DataOutputStream</code> calls the <code>flush</code>
  * method of its underlying output stream.
  *
  * @throws java.io.IOException if an I/O error occurs.
  * @see java.io.FilterOutputStream#out
  * @see java.io.OutputStream#flush()
  */
 @Override
 public void flush() throws IOException {
   codec.flush();
   resetAndClearRefs();
 }