+ /**
+ * Check if this {@link Data} is binary (in this case, the BKey will be
+ * present).
+ *
+ * @return TRUE if it is
+ */
+ public boolean isBinary() {
+ return b64 >= 0;
+ }
+
+ /**
+ * Return the preferred value of this {@link Data}, or
+ * {@link Integer#MAX_VALUE} if none.
+ *
+ * @return the preferred value
+ */
+ public int getPreferred() {
+ for (TypeInfo type : this) {
+ if (type.getName().equals("PRE")) {
+ try {
+ return Integer.parseInt(type.getValue());
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ return Integer.MAX_VALUE;
+ }
+