Base64Utils
Path
com.roma.apic.livedata.common.v1.Base64Utils
Description
This class is used to provide the Base64Utils encoding and decoding functions.
Example
1 2 3 4 5 |
importClass(com.roma.apic.livedata.common.v1.Base64Utils); function execute(data) { var sourceCode = "Hello world!"; return Base64Utils.encode(sourceCode); } |
Method List
Returned Type |
Method and Description |
---|---|
static java.lang.String |
decode(java.lang.String content) Perform Base64 decoding on a character string. |
static java.lang.String |
decodeUrlSafe(java.lang.String content) Perform Base64 decoding on a character string (using the character set compatible with the URL). |
static java.lang.String |
encode(byte[] content) Perform Base64 encoding on a byte array. |
static java.lang.String |
encode(java.lang.String content) Perform Base64 encoding on a character string. |
static java.lang.String |
encodeUrlSafe(byte[] content) Perform Base64 encoding on a byte array (using the character set compatible with the URL). |
static java.lang.String |
encodeUrlSafe(java.lang.String content) Perform Base64 encoding on a character string (using the character set compatible with the URL). |
Method Details
- public static java.lang.String decode(java.lang.String content)
Perform Base64 decoding on a character string.
Input Parameter
content indicates a character string encrypted by using Base64.
Returns
Decrypted character string.
Throws
java.lang.Exception
- public static java.lang.String decodeUrlSafe(java.lang.String content)
Perform Base64 decoding on a byte array (using the character set compatible with the URL).
Input Parameter
content indicates a character string encrypted by using Base64.
Returns
Decrypted character string.
Throws
java.lang.Exception
- public static java.lang.String encode(byte[] content)
Perform Base64 encoding on a byte array.
Input Parameter
content indicates a byte array to be encrypted.
Returns
Encrypted character string.
- public static java.lang.String encode(java.lang.String content)
Perform Base64 encoding on a character string.
Input Parameter
content indicates a character string to be encrypted.
Returns
Encrypted character string.
Throws
java.lang.Exception
- public static java.lang.String encodeUrlSafe(byte[] content)
Perform Base64 encoding on a byte array (using the character set compatible with the URL).
Input Parameter
content indicates a byte array to be encrypted.
Returns
Encrypted character string.
- public static java.lang.String encodeUrlSafe(java.lang.String content)
Perform Base64 encoding on a character string (using the character set compatible with the URL).
Input Parameter
content indicates a character string to be encrypted.
Returns
Encrypted character string.
Throws
java.lang.Exception
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot