* @see Type
*/
public static enum TypeId {
- NULL, BOOLEAN, INTEGER, DOUBLE, STRING, ATTRIBUTES, ARRAY;
+ NULL, BOOLEAN, INTEGER, DOUBLE, STRING, BYTESTRING, ATTRIBUTES, ARRAY;
}
/**
types.put(Integer.class, new Type(TypeId.INTEGER));
types.put(Double.class, new Type(TypeId.DOUBLE));
types.put(String.class, new Type(TypeId.STRING));
+ types.put(RcsByteString.class, new Type(TypeId.BYTESTRING));
types.put(RcsResourceAttributes.class, new Type(TypeId.ATTRIBUTES));
types.put(boolean[].class, new ArrayType(TypeId.BOOLEAN, 1));
types.put(int[].class, new ArrayType(TypeId.INTEGER, 1));
types.put(double[].class, new ArrayType(TypeId.DOUBLE, 1));
types.put(String[].class, new ArrayType(TypeId.STRING, 1));
+ types.put(RcsByteString[].class, new ArrayType(TypeId.BYTESTRING, 1));
types.put(RcsResourceAttributes[].class,
new ArrayType(TypeId.ATTRIBUTES, 1));
types.put(int[][].class, new ArrayType(TypeId.INTEGER, 2));
types.put(double[][].class, new ArrayType(TypeId.DOUBLE, 2));
types.put(String[][].class, new ArrayType(TypeId.STRING, 2));
+ types.put(RcsByteString[][].class, new ArrayType(TypeId.BYTESTRING, 2));
types.put(RcsResourceAttributes[][].class,
new ArrayType(TypeId.ATTRIBUTES, 2));
types.put(int[][][].class, new ArrayType(TypeId.INTEGER, 3));
types.put(double[][][].class, new ArrayType(TypeId.DOUBLE, 3));
types.put(String[][][].class, new ArrayType(TypeId.STRING, 3));
+ types.put(RcsByteString[][][].class, new ArrayType(TypeId.BYTESTRING, 3));
types.put(RcsResourceAttributes[][][].class,
new ArrayType(TypeId.ATTRIBUTES, 3));
/**
* Constructs a new value that holds a RcsResourceAttributes array.
*
- * @param value
- * a RcsResourceAttributes array
+ * @param value a RcsByteString array
+ * @throws NullPointerException if value is null.
+ */
+ public RcsValue(RcsByteString[] value) {
+ this((Object) value);
+ }
+
+ /**
+ * Constructs a new value that holds a two-dimensional RcsByteString array.
+ *
+ * @param value a two-dimensional RcsByteString array
+ * @throws NullPointerException if value is null.
+ */
+ public RcsValue(RcsByteString[][] value) {
+ this((Object) value);
+ }
+
+ /**
+ * Constructs a new value that holds a three-dimensional RcsByteString array.
+ *
+ * @param value a three-dimensional RcsByteString array
+ * @throws NullPointerException if value is null.
+ */
+ public RcsValue(RcsByteString[][][] value) {
+ this((Object) value);
+ }
+
+ /**
+ * Constructs a new value that holds a RcsResourceAttributes array.
*
* @throws NullPointerException
* if value is null.
}
/**
+ * Returns the value as an RcsByteString array, null if the value is not the
+ * desired type.
+ *
+ * @return an RcsByteString array
+ */
+ public RcsByteString[] asByteStringArray() {
+ return getOrNull();
+ }
+
+ /**
+ * Returns the value as a two-dimensional RcsByteString array, null if the
+ * value is not the desired type.
+ *
+ * @return a two-dimensional RcsByteString array
+ */
+ public RcsByteString[][] asByteString2DArray() {
+ return getOrNull();
+ }
+
+ /**
+ * Returns the value as a three-dimensional RcsByteString array, null if the
+ * value is not the desired type.
+ *
+ * @return a three-dimensional RcsByteString array
+ */
+ public RcsByteString[][][] asByteString3DArray() {
+ return getOrNull();
+ }
+
+ /**
* Returns the value as an attributes array, null if the value is not the
* desired type.
*