code: public byte[] toByteArray() throws IOException {
      ByteArrayOutputStream bout = new ByteArrayOutputStream();
      DataOutputStream out = new DataOutputStream(new BufferedOutputStream(bout));
      out.writeLong(this.epoch);
      out.writeLong(this.xid);
      out.flush();
      return bout.toByteArray();
    }
docs: Serialize this Zxid into a fixed size (8 bytes) byte array.
  
  The resulting byte array can be deserialized with fromByteArray.
  @return an array of bytes.
  @throws IOException in case of an IO failure