public final class Encoders
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
base64Decode(byte[] source) |
static byte[] |
base64DecodeText(java.lang.String source) |
static byte[] |
base64Encode(byte[] source) |
static java.lang.String |
base64EncodeText(byte[] source) |
static byte[] |
base64UrlDecodeText(java.lang.String source) |
static java.lang.String |
base64UrlEncodeText(byte[] source) |
static java.lang.String |
bytesToHex(byte[] bytes) |
static java.lang.String |
bytesToHex(byte[] bytes,
boolean lowercase) |
static java.io.InputStream |
createMimeDecodingStream(java.io.InputStream input)
Creates Base64 MIME decoding stream from the underlying input stream.
|
static java.io.OutputStream |
createMimeEncodingStream(java.io.OutputStream output)
Creates Base64 MIME encoding stream from the underlying output stream.
|
static java.io.InputStream |
createPemDecodingStream(java.io.InputStream input)
Creates Base64 PEM encoding stream from the underlying stream.
|
static java.io.OutputStream |
createPemEncodingStream(java.io.OutputStream output)
Creates Base64 PEM encoding stream from the underlying stream.
|
static byte[] |
hexToBytes(java.lang.String hex) |
static java.lang.String |
utf8decode(byte[] source) |
static byte[] |
utf8encode(java.lang.String source) |
public static byte[] utf8encode(java.lang.String source)
source - sourcesource as string.public static java.lang.String utf8decode(byte[] source)
source - sourcesource as bytes array.public static byte[] base64Encode(byte[] source)
source - sourcesource as bytes array.public static byte[] base64Decode(byte[] source)
source - sourcesource as bytes array.public static java.lang.String base64EncodeText(byte[] source)
source - sourcesource as bytes array.public static java.lang.String base64UrlEncodeText(byte[] source)
source - sourcesource as bytes array.public static byte[] base64DecodeText(java.lang.String source)
source - sourcesource as string.public static byte[] base64UrlDecodeText(java.lang.String source)
source - sourcesource as string.public static java.lang.String bytesToHex(byte[] bytes)
bytes - sourcepublic static java.io.OutputStream createMimeEncodingStream(java.io.OutputStream output)
output - the underlying output stream.public static java.io.InputStream createMimeDecodingStream(java.io.InputStream input)
input - the underlying input stream.public static java.io.OutputStream createPemEncodingStream(java.io.OutputStream output)
output - the underlying stream.public static java.io.InputStream createPemDecodingStream(java.io.InputStream input)
input - the underlying stream.public static java.lang.String bytesToHex(byte[] bytes,
boolean lowercase)
bytes - byteslowercase - lowercaselowercase flag.public static byte[] hexToBytes(java.lang.String hex)
hex - hex