@Override protected void attachValueTo(Intent intent, ContentValues container) { if (container == null || intent == null) { return; } byte[] baVal = container.getAsByteArray(getName()); if (baVal == null) { return; } intent.putExtra(getName(), baVal); }
@Override Object getValue(ContentValues container) { if (container == null) { return null; } final String key = getName(); if (container.containsKey(key) == false) { return null; } return container.getAsByteArray(key); }
@Override public byte[] getAsByteArray(String key) { return contentValues.getAsByteArray(key); }
public byte[] getAsByteArray(String key, byte[] def) { return contentValues.containsKey(key) && contentValues.get(key) != null ? contentValues.getAsByteArray(key) : def; }