@Override
    public String toString() {

        // Avoid rebuilding Guacamole protocol form of instruction if already
        // known
        if (rawString == null) {

            // Prefer to construct String from existing char array, rather than
            // reconstruct protocol from scratch
            if (rawChars != null)
                rawString = new String(rawChars);

            // Reconstruct protocol details only if truly necessary
            else {

                StringBuilder buff = new StringBuilder();

                // Write opcode
                appendElement(buff, opcode);

                // Write argument values
                for (String value : args) {
                    buff.append(',');
                    appendElement(buff, value);
                }

                // Write terminator
                buff.append(';');

                // Cache result for future calls
                rawString = buff.toString();

            }

        }

        return rawString;

    }
Returns this GuacamoleInstruction in the form it would be sent over the
Guacamole protocol.

@return
    This GuacamoleInstruction in the form it would be sent over the
    Guacamole protocol.
guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleInstruction.java