public class Base64Encoder extends AbstractBaseNEncoder
| Modifier and Type | Field and Description |
|---|---|
private static char[] |
DEFAULT_ENCODING_TABLE
Default base 64 character encoding table.
|
private static char[] |
URLSAFE_ENCODING_TABLE
Filesystem and URL-safe base 64 character encoding table.
|
lineLength| Constructor and Description |
|---|
Base64Encoder()
Creates a new instance that produces base 64-encoded output with no line breaks in the default character set.
|
Base64Encoder(boolean urlSafe)
Creates a new instance that produces base 64-encoded output with no line breaks and optional URL-safe character
set.
|
Base64Encoder(boolean urlSafe,
int charactersPerLine)
Creates a new instance that produces base 64-encoded output with the given number of characters per line with the
option of URL-safe character set.
|
Base64Encoder(int charactersPerLine)
Creates a new instance that produces base 64-encoded output with the given number of characters per line in the
default character set.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
getBitsPerChar() |
protected int |
getBlockLength() |
encode, finalize, outputSizeprivate static final char[] DEFAULT_ENCODING_TABLE
private static final char[] URLSAFE_ENCODING_TABLE
public Base64Encoder()
public Base64Encoder(boolean urlSafe)
urlSafe - True to use URL and filesystem-safe character set, false otherwise.public Base64Encoder(int charactersPerLine)
charactersPerLine - Number of characters per line. A zero or negative value disables line breaks.public Base64Encoder(boolean urlSafe,
int charactersPerLine)
urlSafe - True to use URL and filesystem-safe character set, false otherwise.charactersPerLine - Number of characters per line. A zero or negative value disables line breaks.protected int getBlockLength()
getBlockLength in class AbstractBaseNEncoderprotected int getBitsPerChar()
getBitsPerChar in class AbstractBaseNEncoder