code: protected static FlushableDataOutput writeHeader(final ManagementProtocolHeader header, final OutputStream os) throws IOException {
          final FlushableDataOutput output = FlushableDataOutputImpl.create(os);
          header.write(output);
          return output;
      }
docs: Write the management protocol header.
  
  @param header the mgmt protocol header
  @param os the output stream
  @throws IOException