public class BundleUtil
extends java.lang.Object
Bundle instances to and from bytes and encoded Strings.| Constructor and Description |
|---|
BundleUtil() |
| Modifier and Type | Method and Description |
|---|---|
static android.os.Bundle |
fromBytes(byte[] bytes)
Converts the given bytes to a
Bundle. |
static android.os.Bundle |
fromEncodedString(java.lang.String encodedString)
Converts the given Base64 encoded String to a
Bundle. |
static byte[] |
toBytes(android.os.Bundle bundle)
Converts the given
Bundle to raw bytes. |
static java.lang.String |
toEncodedString(android.os.Bundle bundle)
Converts the given
Bundle to a Base64 encoded String. |
public static byte[] toBytes(android.os.Bundle bundle)
Bundle to raw bytes.
Note that if the Bundle contains some highly specialized classes
IBinder, this process will fail.bundle - The Bundle to convert.Bundle as bytes.public static java.lang.String toEncodedString(android.os.Bundle bundle)
Bundle to a Base64 encoded String.
Note that if the Bundle contains some highly specialized classes
IBinder, this process will fail.bundle - The Bundle to convert.Bundle as a Base64 encoded String.public static android.os.Bundle fromBytes(byte[] bytes)
Bundle.
Note that if the bytes do not represent a Bundle that was previously converted with
toBytes(Bundle), this process will likely fail.bytes - The bytes to convert.Bundle.public static android.os.Bundle fromEncodedString(java.lang.String encodedString)
Bundle.
Note that if the String does not represent a Bundle that was previously converted
with toEncodedString(Bundle) (Bundle)}, this process will likely fail.encodedString - The bytes to convert.Bundle.