code: public byte[] toBytes() throws IOException {
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          // 0. write command number
          out.write(getCommand());
          // 1. write 4 bytes bin-log position to start at
          ByteHelper.writeUnsignedIntLittleEndian(binlogPosition, out);
          // 2. write 2 bytes bin-log flags
          int binlog_flags = 0;
          binlog_flags |= BINLOG_SEND_ANNOTATE_ROWS_EVENT;
          out.write(binlog_flags);
          out.write(0x00);
          // 3. write 4 bytes server id of the slave
          ByteHelper.writeUnsignedIntLittleEndian(this.slaveServerId, out);
          // 4. write bin-log file name if necessary
          if (StringUtils.isNotEmpty(this.binlogFileName)) {
              out.write(this.binlogFileName.getBytes());
          }
          return out.toByteArray();
      }
docs: <pre>
  Bytes                        Name
  -----                        ----
  1                            command
  n                            arg
  --------------------------------------------------------
  Bytes                        Name
  -----                        ----
  4                            binlog position to start at (little endian)
  2                            binlog flags (currently not used; always 0)
  4                            server_id of the slave (little endian)
  n                            binlog file name (optional)
  
  </pre>