public class EncodingUtil
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EncodingUtil.DeflateStrategy
Supported Deflate strategies.
|
| Constructor and Description |
|---|
EncodingUtil() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decodeBase64(java.lang.String s)
Decode base64 to bytes.
|
static byte[] |
deflate(byte[] b,
EncodingUtil.DeflateStrategy strategy)
Applies ZLIB compression.
|
static byte[] |
deflate(byte[] b,
int offset,
int len,
EncodingUtil.DeflateStrategy strategy)
Applies ZLIB compression.
|
static java.lang.String |
encodeBase64(byte[] b)
Encode bytes as base64.
|
static byte[] |
fromHex(java.lang.String hex)
Convert a string of hex to bytes.
|
static byte[] |
inflate(byte[] b)
Inflate from ZLIB compression.
|
static byte[] |
inflate(byte[] b,
int offset,
int len)
Inflate from ZLIB compression.
|
static java.lang.String |
toHex(byte[] bytes)
Converts bytes to a string of hex.
|
public static final byte[] fromHex(java.lang.String hex)
hex - The hex string.public static final java.lang.String toHex(byte[] bytes)
bytes - The bytespublic static final java.lang.String encodeBase64(byte[] b)
b - The bytes.public static final byte[] decodeBase64(java.lang.String s)
s - The encoded string.public static final byte[] deflate(byte[] b,
EncodingUtil.DeflateStrategy strategy)
b - The bytes to deflate.strategy - The deflate strategy.public static final byte[] deflate(byte[] b,
int offset,
int len,
EncodingUtil.DeflateStrategy strategy)
b - The bytes to deflate.offset - The offset.len - The number of bytes.strategy - The deflate strategy.public static final byte[] inflate(byte[] b)
b - The bytes to inflate.public static final byte[] inflate(byte[] b,
int offset,
int len)
b - The bytes to inflate.offset - The offset.len - The number of bytes.