@Immutable public final class Base64Helper extends Object
Base64 class without
exception catching.| Modifier and Type | Method and Description |
|---|---|
static byte[] |
safeDecode(byte[] aEncodedBytes)
Decode the byte array.
|
static byte[] |
safeDecode(String sEncoded)
Decode the string with the default encoding (US-ASCII is the preferred
one).
|
static String |
safeDecodeAsString(byte[] aEncodedBytes,
Charset aCharset)
Decode the byte array and convert it to a string.
|
static String |
safeDecodeAsString(byte[] aEncodedBytes,
String sCharset)
Deprecated.
|
static String |
safeDecodeAsString(String sEncoded,
Charset aCharset)
Decode the string and convert it back to a string.
|
static String |
safeDecodeAsString(String sEncoded,
String sCharset)
Deprecated.
|
static String |
safeEncode(String s,
Charset aCharset) |
static String |
safeEncode(String s,
String sCharset)
Deprecated.
|
@Nullable public static byte[] safeDecode(@Nonnull String sEncoded)
sEncoded - The encoded string.null if decoding failed.@Nullable public static byte[] safeDecode(@Nonnull byte[] aEncodedBytes)
aEncodedBytes - The encoded byte array.null if decoding failed.@Nullable @Deprecated public static String safeDecodeAsString(@Nonnull String sEncoded, @Nonnull String sCharset)
sEncoded - The encoded byte array.sCharset - The character set to be used.null if decoding failed.@Nullable public static String safeDecodeAsString(@Nonnull String sEncoded, @Nonnull Charset aCharset)
sEncoded - The encoded byte array.aCharset - The character set to be used.null if decoding failed.@Nullable @Deprecated public static String safeDecodeAsString(@Nonnull byte[] aEncodedBytes, @Nonnull String sCharset)
aEncodedBytes - The encoded byte array.sCharset - The character set to be used.null if decoding failed.@Nullable public static String safeDecodeAsString(@Nonnull byte[] aEncodedBytes, @Nonnull Charset aCharset)
aEncodedBytes - The encoded byte array.aCharset - The character set to be used.null if decoding failed.@Nullable @Deprecated public static String safeEncode(@Nonnull String s, @Nonnull@Nonempty String sCharset)
s - The string to be encodedsCharset - The charset to be usedCopyright © 2006–2014 phloc systems. All rights reserved.