public String toString() {
        if (!hasData()) return null;
        // Dump message as text or hex-encoded string
        boolean isText = true;
        for (int i = 0;i< data.length;i++) {
            if (data[i] < 32 || data[i] > 127)
                isText = false;
        }
        if (isText) 
            return new String(data);
        else
            return strhex();
    }