Utilities
This service provides utilities for string encoding/decoding, date formatting, JSON manipulation, and other miscellaneous tasks.
Classes
Name | Brief description |
---|---|
Charset
|
A typesafe enum for character sets. |
DigestAlgorithm
|
Selector of Digest algorithm. |
MacAlgorithm
|
Selector of MAC algorithm |
RsaAlgorithm
|
Selector of RSA algorithm |
Utilities
|
This service provides utilities for string encoding/decoding, date formatting, JSON manipulation, and other miscellaneous tasks. |
Charset
Properties
Property | Type | Description |
---|---|---|
US_ASCII
|
Enum
|
|
UTF_8
|
Enum
|
DigestAlgorithm
Properties
Property | Type | Description |
---|---|---|
MD2
|
Enum
|
MD2 algorithm |
MD5
|
Enum
|
MD5 algorithm |
SHA_1
|
Enum
|
SHA-1 algorithm |
SHA_256
|
Enum
|
SHA-256 algorithm |
SHA_384
|
Enum
|
SHA-384 algorithm |
SHA_512
|
Enum
|
SHA-512 algorithm |
MacAlgorithm
Properties
Property | Type | Description |
---|---|---|
HMAC_MD5
|
Enum
|
|
HMAC_SHA_1
|
Enum
|
|
HMAC_SHA_256
|
Enum
|
|
HMAC_SHA_384
|
Enum
|
|
HMAC_SHA_512
|
Enum
|
RsaAlgorithm
Properties
Property | Type | Description |
---|---|---|
RSA_SHA_1
|
Enum
|
|
RSA_SHA_256
|
Enum
|
Utilities
Properties
Property | Type | Description |
---|---|---|
Charset
|
Charset
|
|
DigestAlgorithm
|
DigestAlgorithm
|
|
MacAlgorithm
|
MacAlgorithm
|
|
RsaAlgorithm
|
RsaAlgorithm
|
Methods
Method | Return type | Brief description |
---|---|---|
Byte[]
|
Decodes a base-64 encoded string into a UTF-8 byte array. | |
Byte[]
|
Decodes a base-64 encoded string into a byte array in a specific character set. | |
Byte[]
|
Decodes a base-64 web-safe encoded string into a UTF-8 byte array. | |
Byte[]
|
Decodes a base-64 web-safe encoded string into a byte array in a specific character set. | |
String
|
Generates a base-64 encoded string from the given byte array. | |
String
|
Generates a base-64 encoded string from the given string. | |
String
|
Generates a base-64 encoded string from the given string in a specific character set. | |
String
|
Generates a base-64 web-safe encoded string from the given byte array. | |
String
|
Generates a base-64 web-safe encoded string from the given string. | |
String
|
Generates a base-64 web-safe encoded string from the given string in a specific character set. | |
Byte[]
|
Compute a digest using the specified algorithm on the specified Byte[]
value. |
|
Byte[]
|
Compute a digest using the specified algorithm on the specified String
value. |
|
Byte[]
|
Compute a digest using the specified algorithm on the specified String
value with the
given character set. |
|
Byte[]
|
Signs the provided value using HMAC-SHA256 with the given key. | |
Byte[]
|
Signs the provided value using HMAC-SHA256 with the given key. | |
Byte[]
|
Signs the provided value using HMAC-SHA256 with the given key and character set. | |
Byte[]
|
Compute a message authentication code using the specified algorithm on the specified key and value. | |
Byte[]
|
Compute a message authentication code using the specified algorithm on the specified key and value. | |
Byte[]
|
Compute a message authentication code using the specified algorithm on the specified key and value. | |
Byte[]
|
Signs the provided value using RSA-SHA1 with the given key. | |
Byte[]
|
Signs the provided value using RSA-SHA1 with the given key and charset. | |
Byte[]
|
Signs the provided value using RSA-SHA256 with the given key. | |
Byte[]
|
Signs the provided value using RSA-SHA256 with the given key. | |
Byte[]
|
Signs the provided value using the specified RSA algorithm with the given key. | |
Byte[]
|
Signs the provided value using the specified RSA algorithm with the given key and charset. | |
String
|
Formats date according to specification described in Java SE SimpleDateFormat class. | |
String
|
Performs sprintf
-like string formatting using '%'-style format strings. |
|
String
|
Get a UUID as a string (equivalent to using the java.util.UUID.randomUUID()
method). |
|
Blob
|
gzip
-compresses the provided Blob
data and returns it in a new Blob
object. |
|
Blob
|
gzip
-compresses the provided Blob
data and returns it in a new Blob
object. |
|
Blob
|
Create a new Blob object from a byte array. | |
Blob
|
Create a new Blob object from a byte array and content type. | |
Blob
|
Create a new Blob object from a byte array, content type, and name. | |
Blob
|
Create a new Blob object from a string. | |
Blob
|
Create a new Blob object from a string and content type. | |
Blob
|
Create a new Blob object from a string, content type, and name. | |
String[][]
|
Returns a tabular 2D array representation of a CSV string. | |
String[][]
|
Returns a tabular 2D array representation of a CSV string using a custom delimiter. | |
Date
|
Parses the provided string date according to the specification described in the Java Standard
Edition SimpleDateFormat
class. |
|
void
|
Sleeps for specified number of milliseconds. | |
Blob
|
Uncompresses a Blob
object and returns a Blob
containing the uncompressed
data. |
|
Blob[]
|
Takes a Blob representing a zip file and returns its component files. | |
Blob
|
Creates a new Blob object that is a zip file containing the data from the Blobs passed in. | |
Blob
|
Creates a new Blob object that is a zip file containing the data from the Blobs passed in. |