@Override
    public char[] read() throws GuacamoleException {

        GuacamoleInstruction filteredInstruction = readInstruction();
        if (filteredInstruction == null)
            return null;

        return filteredInstruction.toString().toCharArray();
        
    }
Wraps the given GuacamoleReader, applying the given filter to all read
instructions. Future reads will return only instructions which pass
the filter.

@param reader The GuacamoleReader to wrap.
@param filter The filter which dictates which instructions are read, and
              how.
guacamole-common/src/main/java/org/apache/guacamole/protocol/FilteredGuacamoleReader.java