public class Base64
extends java.lang.Object
Constructor | Description |
---|---|
Base64() |
Modifier and Type | Method | Description |
---|---|---|
static byte[] |
decode(byte[] src) |
Decode the given byte[].
|
static java.lang.String |
decode(java.lang.String src) |
Decode the given string.
|
static byte[] |
encode(byte[] src) |
Encode the given byte[].
|
static byte[] |
encode(byte[] src,
int lineFeed) |
Encode the given byte[].
|
static java.lang.String |
encode(java.lang.String src) |
Encode the given string.
|
public static final byte[] encode(byte[] src)
src
- the source string.public static final byte[] encode(byte[] src, int lineFeed)
src
- the source string.lineFeed
- a linefeed is added after linefeed
characters;
must be dividable by four; 0 means no linefeedspublic static final java.lang.String encode(java.lang.String src)
src
- the source string.public static final byte[] decode(byte[] src) throws java.lang.IllegalArgumentException
src
- the base64-encoded data.java.lang.IllegalArgumentException
- Thrown if the base 64 strings contains non-valid characters,
beside the bas64 chars, LF, CR, tab and space are accepted.public static final java.lang.String decode(java.lang.String src)
src
- the base64-encoded string.Copyright © 1998–2018. All rights reserved.