public class Base64
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
encodingChar |
Constructor and Description |
---|
Base64() |
Modifier and Type | Method and Description |
---|---|
private static void |
convert3To4(char[] source,
int sourceIndex,
char[] target) |
private static void |
convert4To3(byte[] source,
byte[] target,
int targetIndex) |
static java.lang.String |
decode(java.lang.String source)
Returns the plaintext equivalent of a base 64-encoded string.
|
static java.lang.String |
encode(java.lang.String source)
Returns the base 64 encoded equivalent of a supplied string.
|
private static char[] |
getPaddedBytes(java.lang.String source) |
static final java.lang.String encodingChar
public static java.lang.String encode(java.lang.String source)
source
- the string to encodeprivate static char[] getPaddedBytes(java.lang.String source)
private static void convert3To4(char[] source, int sourceIndex, char[] target)
public static java.lang.String decode(java.lang.String source)
source
- a base 64 string (which must have a multiple of 4 characters)private static void convert4To3(byte[] source, byte[] target, int targetIndex)
Copyright © 2013. All Rights Reserved.