public class Base64
extends java.lang.Object
Constructor and Description |
---|
Base64() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
decode(char[] chars)
Decodes base64 characters into bytes.
|
static byte[] |
decode(java.lang.String encodedString)
Decodes a base64 string into bytes.
|
static java.lang.String |
encode(byte[] bytes,
boolean newlines)
Encodes an entire byte array into a Base64 string, with optional newlines
after every 76 characters.
|
static java.lang.String |
encode(byte[] bytes,
int off,
int len,
boolean newlines)
Encodes specified bytes into a Base64 string, with optional newlines
after every 76 characters.
|
public static byte[] decode(char[] chars)
chars
- The characters array to decode.public static byte[] decode(java.lang.String encodedString)
encodedString
- The string to decode.public static java.lang.String encode(byte[] bytes, boolean newlines)
bytes
- The byte array to encode.newlines
- Indicates whether or not newlines are desired.public static java.lang.String encode(byte[] bytes, int off, int len, boolean newlines)
bytes
- The byte array to encode.off
- The starting offset.len
- The number of bytes to encode.newlines
- Indicates whether or not newlines are desired.Copyright © 2005-2020 Restlet.