@Override
    public boolean hasNext() {
        return state == State.COMPLETE;
    }
Appends data from the given buffer to the current instruction.

@param chunk The data to append.
@return The number of characters appended, or 0 if complete instructions
        have already been parsed and must be read via next() before
        more data can be appended.
@throws GuacamoleException If an error occurs while parsing the new data.
guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleParser.java