public class Base64Encoder extends ByteToCharEncoder<Base64Encoder>
Encodes to "Base64 encoding", as specified by http://tools.ietf.org/html/rfc4648#section-4.
Modifier and Type | Field and Description |
---|---|
protected char[] |
byteToCharList |
protected static float |
CORE_CHARS_PER_BYTE |
static String |
DEFAULT_SECTION_SEPARATOR |
protected int |
minOutFree |
protected String |
sectionSeparator |
protected int |
separatorFreq |
protected long |
sepCharsWritten |
averageOutPerIn, maxOutPerIn, minInPerOut, state
Constructor and Description |
---|
Base64Encoder() |
Modifier and Type | Method and Description |
---|---|
protected void |
addSectionSeparator(CharBuffer out) |
protected CoderResult |
codingLoop(ByteBuffer in,
CharBuffer out,
boolean endOfInput) |
protected void |
configImpl(Base64Encoder base)
Hook for implementations to configure themselves from another instance.
|
char[] |
getByteToCharList() |
String |
getSectionSeparator() |
int |
getSeparatorFreq() |
protected void |
init()
Hook called once after the first coding operation is started.
|
protected void |
resetImpl()
Hook called from
BaseCoder.reset() . |
Base64Encoder |
setByteToCharList(char[] byteToCharList) |
Base64Encoder |
setSectionSeparator(String sectionSeparator) |
Base64Encoder |
setSeparatorFreq(int separatorFreq) |
allocate, encodeToString, put
checkConfigAllowed, checkNullArgument, clone, code, code, config, flush, getAverageOutPerIn, getMaxOutPerIn, getMinInPerOut, implFlush, reset, throwIllegalStateException
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, code, code, config, flush, getAverageOutPerIn, getMaxOutPerIn, getMinInPerOut, reset
public static final String DEFAULT_SECTION_SEPARATOR
protected static final float CORE_CHARS_PER_BYTE
protected char[] byteToCharList
protected String sectionSeparator
protected int separatorFreq
protected transient long sepCharsWritten
protected transient int minOutFree
protected void configImpl(Base64Encoder base)
BaseCoder
Hook for implementations to configure themselves from another instance. The base implementation does nothing.
configImpl
in class BaseCoder<ByteBuffer,CharBuffer,Base64Encoder>
base
- The instance to copy the configuration from.protected void init()
BaseCoder
Hook called once after the first coding operation is started. The base implementation does nothing.
init
in class BaseCoder<ByteBuffer,CharBuffer,Base64Encoder>
public char[] getByteToCharList()
public Base64Encoder setByteToCharList(char[] byteToCharList)
public String getSectionSeparator()
public Base64Encoder setSectionSeparator(String sectionSeparator)
public int getSeparatorFreq()
public Base64Encoder setSeparatorFreq(int separatorFreq)
protected CoderResult codingLoop(ByteBuffer in, CharBuffer out, boolean endOfInput)
codingLoop
in class BaseCoder<ByteBuffer,CharBuffer,Base64Encoder>
protected void addSectionSeparator(CharBuffer out)
protected void resetImpl()
BaseCoder
Hook called from BaseCoder.reset()
.
The base implementation does nothing.
resetImpl
in class BaseCoder<ByteBuffer,CharBuffer,Base64Encoder>
Copyright © 2009–2017 Mark A. Ziesemer. All rights reserved.