public class PCMUtils
extends java.lang.Object
Constructor and Description |
---|
PCMUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
convertBase64ToBytes(java.lang.String base64EncodedStr)
Convert Base64 encoded string to bytes array.
|
static java.lang.String |
convertBytesToBase64(byte[] bytes)
Convert input bytes to Base64 encoded string.
|
static java.lang.String |
convertBytesToHex(byte[] bytes)
Convert input bytes to hex encoded string.
|
static byte[] |
convertHexToBytes(java.lang.String hexString)
Convert input hex encoded string to bytes.
|
static long |
rfc3339FormatToUnixTime(java.lang.String rfc3339DateStr)
Method to convert from RFC3339 format 1970-05-23T21:21:18.18Z to
Unix time (seconds from epoch) format.
|
static java.lang.String |
unixTimeToRFC3339Format(long secondsFromEpoch)
Method to convert from Unix time (seconds from epoch) format to
RFC3339 format 1970-05-23T21:21:18.18Z
|
public static java.lang.String convertBytesToHex(byte[] bytes)
bytes
- Input byte array.public static byte[] convertHexToBytes(java.lang.String hexString)
hexString
- Hex encoded string.public static java.lang.String convertBytesToBase64(byte[] bytes)
bytes
- Input byte array.public static byte[] convertBase64ToBytes(java.lang.String base64EncodedStr)
base64EncodedStr
- Input ase64 encoded string.public static java.lang.String unixTimeToRFC3339Format(long secondsFromEpoch)
secondsFromEpoch
- Unix time (seconds from epoch)public static long rfc3339FormatToUnixTime(java.lang.String rfc3339DateStr)
rfc3339DateStr
- RFC3339 format 1970-05-23T21:21:18.18Z as String