Package com.ibm.ima.plugin.util
Class ImaBase64
Object
com.ibm.ima.plugin.util.ImaBase64
The ImaBase64 class is used to convert byte arrays to and from base64 strings.
The ImaBase64 class provides static methods for efficient between byte arrays and base64 strings.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]fromBase64(String from) Convert from a base64 string to a byte array.static StringtoBase64(byte[] from) Convert a byte array to a base64 string.
-
Field Details
-
COPYRIGHT
- See Also:
-
-
Method Details
-
toBase64
Convert a byte array to a base64 string.- Parameters:
from- The source byte array- Returns:
- A string in base64. This is always a multiple of 4 bytes.
-
fromBase64
Convert from a base64 string to a byte array.- Parameters:
from- The input string in base64 which must be a multiple of 4 bytes- Returns:
- The byte array or null to indicate the string is not valid base64
-