public String toString() {
        StringBuffer result = new StringBuffer("[ByteArray len:");
        result.append(bytes.length);
        result.append(" ");
        if (bytes.length > 0)
            result.append((new Byte(bytes[0])).toString());
        for (int i = 1; i < bytes.length; i++) {
            result.append(",");
            result.append((new Byte(bytes[i])).toString());
        }
        result.append("]");
        return result.toString();
    }