code: public void flush() throws IOException {
          final ByteOutput output = this.output;
          final int pos = this.position;
          if (pos > 0) {
              output.write(CHUNK_START);
              writeInt(pos);
              final byte[] buffer = this.buffer;
              output.write(buffer, 0, pos);
          }
          this.position = 0;
      }
docs: Writes a {@code CHUNK_START} header followed by the size of chunk being flushed followed by the data being flushed.
  It will then flush the underlying byte output.
  
  @throws IOException