code: protected byte[] encode(XEvent event) throws IOException {
  		// prepare output stream for encoding
  		ByteArrayOutputStream baos = new ByteArrayOutputStream();
  		DataOutputStream dos = new DataOutputStream(baos);
  		// write event id to output stream
  		XID.write(event.getID(), dos);
  		// encode attributes
  		this.attributeMapSerializer.serialize(event.getAttributes(), dos);
  		// flush and serialize output stream result
  		dos.flush();
  		return baos.toByteArray();
  	}
docs: Encodes the given event into a sequence of bytes. This byte array
  corresponds to the structure of an event record, as specified in the
  beginning of this document, excluding the back-/forward offsets used for
  navigation.
  
  @param ate
  The event to be encoded.
  @return byte Array representing the event without navigation offsets.