Package org.codehaus.stax2.ri.typed
Class ValueEncoderFactory.Base64Encoder
java.lang.Object
org.codehaus.stax2.ri.typed.AsciiValueEncoder
org.codehaus.stax2.ri.typed.ValueEncoderFactory.Base64Encoder
- Enclosing class:
ValueEncoderFactory
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) intWe need a counter to know when to add mandatory linefeed.(package private) final byte[](package private) final int(package private) int(package private) final Base64Variant(package private) static final byte(package private) static final byte(package private) static final byte(package private) static final charFields inherited from class org.codehaus.stax2.ri.typed.AsciiValueEncoder
MIN_CHARS_WITHOUT_FLUSH -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBase64Encoder(Base64Variant v, byte[] values, int from, int end) -
Method Summary
Modifier and TypeMethodDescriptionintencodeMore(byte[] buffer, int outPtr, int outEnd) intencodeMore(char[] buffer, int outPtr, int outEnd) booleanMethod that can alternatively be called to determine whether encoder has encoded all data it has.Methods inherited from class org.codehaus.stax2.ri.typed.AsciiValueEncoder
bufferNeedsFlush
-
Field Details
-
PAD_CHAR
static final char PAD_CHAR- See Also:
-
PAD_BYTE
static final byte PAD_BYTE- See Also:
-
LF_CHAR
static final byte LF_CHAR- See Also:
-
LF_BYTE
static final byte LF_BYTE- See Also:
-
_variant
-
_input
final byte[] _input -
_inputPtr
int _inputPtr -
_inputEnd
final int _inputEnd -
_chunksBeforeLf
int _chunksBeforeLfWe need a counter to know when to add mandatory linefeed.
-
-
Constructor Details
-
Base64Encoder
-
-
Method Details
-
isCompleted
public boolean isCompleted()Description copied from class:AsciiValueEncoderMethod that can alternatively be called to determine whether encoder has encoded all data it has. Generally called right after a call toAsciiValueEncoder.encodeMore(char[], int, int), to figure out whether buffer flush is needed (there is more data), or encoding is complete.- Specified by:
isCompletedin classAsciiValueEncoder
-
encodeMore
public int encodeMore(char[] buffer, int outPtr, int outEnd) - Specified by:
encodeMorein classAsciiValueEncoder- Returns:
- Value of pointer after all remaining data (which
may be "none") that can be encoded (as constrained by
buffer length) has been encoded. Has to exceed 'ptr'
value sent in; will be equal to it if nothing was
encoded (which should only occur when everything has
been encoded, as long as
AsciiValueEncoder.bufferNeedsFlush(int)is appropriately called once before calling this method)
-
encodeMore
public int encodeMore(byte[] buffer, int outPtr, int outEnd) - Specified by:
encodeMorein classAsciiValueEncoder- Returns:
- Value of pointer after all remaining data (which
may be "none") that can be encoded (as constrained by
buffer length) has been encoded. Has to exceed 'ptr'
value sent in; will be equal to it if nothing was
encoded (which should only occur when everything has
been encoded, as long as
AsciiValueEncoder.bufferNeedsFlush(int)is appropriately called once before calling this method)
-