Package com.ibm.ima.plugin.util
Class ImaBase64
- Object
-
- com.ibm.ima.plugin.util.ImaBase64
-
public class ImaBase64 extends Object
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 Modifier and Type Field Description static String
COPYRIGHT
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
fromBase64(String from)
Convert from a base64 string to a byte array.static String
toBase64(byte[] from)
Convert a byte array to a base64 string.
-
-
-
Field Detail
-
COPYRIGHT
public static final String COPYRIGHT
- See Also:
- Constant Field Values
-
-
Method Detail
-
toBase64
public static String toBase64(byte[] from)
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
public static byte[] fromBase64(String from)
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
-
-