Package snap.util
Class ASCIICodec
java.lang.Object
snap.util.ASCIICodec
This class has utility methods to code and decode into various different formats: hex, ASCII85, base 64.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
decodeASCII85
(String aString) Returns a byte array for given ASCII85 string.static byte[]
decodeBase64
(String aString) Returns a byte array for given base64 string.static byte[]
Returns a byte array for given hex string.static String
encodeASCII85
(byte[] theBytes) Returns an ASCII85 string for given byte array.static String
encodeBase64
(byte[] theBytes) Returns a base64 string for given byte array.static String
encodeHex
(byte[] theBytes) Returns a hex string for given byte array.
-
Constructor Details
-
ASCIICodec
public ASCIICodec()
-
-
Method Details
-
encodeHex
Returns a hex string for given byte array. -
decodeHex
Returns a byte array for given hex string. -
encodeBase64
Returns a base64 string for given byte array. -
decodeBase64
Returns a byte array for given base64 string. -
encodeASCII85
Returns an ASCII85 string for given byte array. -
decodeASCII85
Returns a byte array for given ASCII85 string.
-