/** * Gets a bytearray from the preferences. * * @param key the preferences key * @param def the default values * @return the byte array */ public byte[] getByteArray(String key, byte[] def) { byte[] val = getByteArray(key); return val == null ? def : val; }