code: public byte[] getMessage() {
          byte result[] = new byte[events.length + 7];
  
          result[0] = (byte)(byteCount = events.length + 6);
          result[1] = (byte)(status >> 8);
          result[2] = (byte)(status & 0xFF);
          result[3] = (byte)(eventCount >> 8);
          result[4] = (byte)(eventCount & 0xFF);
          result[5] = (byte)(messageCount >> 8);
          result[6] = (byte)(messageCount & 0xFF);
  
          System.arraycopy(events, 0, result, 7, events.length);
  
          return result;
      }
docs: getMessage -- format the message into a byte array.
  @return Response as byte array