int type = -1;
if (format.equalsIgnoreCase("SCALAR") && stype != null
&& !stype.equals("")) {
type = toType(stype);
if (type == 1) { // Boolean
send("read", attr.extractBoolean());
} else if (type >= 2 && type <= 7) { // Number
send("read", attr.extractDouble());
} else if (type == 8) { // String
send("read", attr.extractString());
}