public final class Base64Variant extends Object
Implementation notes:
Modifier and Type | Field and Description |
---|---|
static int |
BASE64_VALUE_INVALID
Marker used to denote ascii characters that do not correspond
to a 6-bit value (in this variant), and is not used as a padding
character.
|
static int |
BASE64_VALUE_PADDING
Marker used to denote ascii character (in decoding table) that
is the padding character using this variant (if any).
|
Constructor and Description |
---|
Base64Variant(Base64Variant base,
String name,
boolean usesPadding,
char paddingChar,
int maxLineLength)
"Copy constructor" that can be used when the base alphabet is identical
to one used by another variant, but other details (padding, maximum
line length) differ
|
Base64Variant(Base64Variant base,
String name,
int maxLineLength)
"Copy constructor" that can be used when the base alphabet is identical
to one used by another variant except for the maximum line length
(and obviously, name).
|
Base64Variant(String name,
String base64Alphabet,
boolean usesPadding,
char paddingChar,
int maxLineLength) |
Modifier and Type | Method and Description |
---|---|
int |
decodeBase64Byte(byte b) |
int |
decodeBase64Char(char c) |
byte |
encodeBase64BitsAsByte(int value) |
char |
encodeBase64BitsAsChar(int value) |
int |
encodeBase64Chunk(int b24,
byte[] buffer,
int ptr)
Method that encodes given right-aligned (LSB) 24-bit value
into 4 base64 bytes (ascii), stored in given result buffer.
|
int |
encodeBase64Chunk(int b24,
char[] buffer,
int ptr)
Method that encodes given right-aligned (LSB) 24-bit value
into 4 base64 characters, stored in given result buffer.
|
int |
encodeBase64Partial(int bits,
int outputBytes,
byte[] buffer,
int outPtr)
Method that outputs partial chunk (which only encodes one
or two bytes of data).
|
int |
encodeBase64Partial(int bits,
int outputBytes,
char[] buffer,
int outPtr)
Method that outputs partial chunk (which only encodes one
or two bytes of data).
|
int |
getMaxLineLength() |
String |
getName() |
byte |
getPaddingByte() |
char |
getPaddingChar() |
String |
toString() |
boolean |
usesPadding() |
boolean |
usesPaddingChar(char c) |
public static final int BASE64_VALUE_INVALID
public static final int BASE64_VALUE_PADDING
public Base64Variant(String name, String base64Alphabet, boolean usesPadding, char paddingChar, int maxLineLength)
public Base64Variant(Base64Variant base, String name, int maxLineLength)
public Base64Variant(Base64Variant base, String name, boolean usesPadding, char paddingChar, int maxLineLength)
public String getName()
public boolean usesPadding()
public boolean usesPaddingChar(char c)
public char getPaddingChar()
public byte getPaddingByte()
public int getMaxLineLength()
public int decodeBase64Char(char c)
public int decodeBase64Byte(byte b)
public char encodeBase64BitsAsChar(int value)
public int encodeBase64Chunk(int b24, char[] buffer, int ptr)
public int encodeBase64Partial(int bits, int outputBytes, char[] buffer, int outPtr)
outputBytes
- Number of encoded bytes included (either 1 or 2)public byte encodeBase64BitsAsByte(int value)
public int encodeBase64Chunk(int b24, byte[] buffer, int ptr)
public int encodeBase64Partial(int bits, int outputBytes, byte[] buffer, int outPtr)
outputBytes
- Number of encoded bytes included (either 1 or 2)Copyright © 2012-2015 fasterxml.com. All Rights Reserved.