Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- byte[] bytes = someBytes(); // Original array, contains 5039 bytes
- String toStore = new String(bytes);
- sharedPreferences.edit().putString("Data", toStore).apply();
- String fromStore = sharedPreferences.getString("Data", "");
- byte[] readBytes = fromStore.getBytes(); // Read array, contains 8907 bytes. WHY?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement