This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String serializeBundle(final Bundle bundle) { | |
String base64 = null; | |
final Parcel parcel = Parcel.obtain(); | |
try { | |
parcel.writeBundle(bundle); | |
final ByteArrayOutputStream bos = new ByteArrayOutputStream(); | |
final GZIPOutputStream zos = new GZIPOutputStream(new BufferedOutputStream(bos)); | |
zos.write(parcel.marshall()); | |
zos.close(); | |
base64 = Base64.encodeToString(bos.toByteArray(), 0); |
NewerOlder