- eventName = new String(data, dataOffset, data.length - dataOffset).trim();
- filterString = null; /* Not yet sent by the sessiond */
+ /* Read the event name */
+ byte[] eventNameBytes = new byte[EVENT_NAME_LENGTH];
+ buf.get(eventNameBytes);
+ eventName = new String(eventNameBytes).trim();
+
+ /* Read the filter string */
+ filterString = readNextString(buf);
+
+ /* The command was invalid if the string could not be read correctly */
+ commandIsValid = (filterString != null);