public final class StringBase64Decoder extends Object
Constructor and Description |
---|
StringBase64Decoder() |
Modifier and Type | Method and Description |
---|---|
int |
decode(byte[] resultBuffer,
int resultOffset,
int maxLength)
Method that does actual decoding
|
byte[] |
decodeCompletely()
Method that can be called to completely decode content that this
decoder has been initialized with.
|
int |
endOfContent()
Method called to indicate that we have no more encoded content to
process, and decoding is to finish.
|
Stax2Util.ByteAggregator |
getByteAggregator() |
boolean |
hasData()
Method that can be called to check if this decoder is in has unflushed
data ready to be returned.
|
void |
init(Base64Variant variant,
boolean firstChunk,
String segment) |
protected IllegalArgumentException |
reportInvalidChar(char ch,
int bindex) |
protected IllegalArgumentException |
reportInvalidChar(char ch,
int bindex,
String msg) |
public void init(Base64Variant variant, boolean firstChunk, String segment)
public int decode(byte[] resultBuffer, int resultOffset, int maxLength) throws IllegalArgumentException
resultBuffer
- Buffer in which decoded bytes are returnedresultOffset
- Offset that points to position to put the
first decoded byte in maxLength Maximum number of bytes that can be returned
in given bufferIllegalArgumentException
public final boolean hasData()
public final int endOfContent()
public byte[] decodeCompletely()
public Stax2Util.ByteAggregator getByteAggregator()
protected IllegalArgumentException reportInvalidChar(char ch, int bindex) throws IllegalArgumentException
IllegalArgumentException
protected IllegalArgumentException reportInvalidChar(char ch, int bindex, String msg) throws IllegalArgumentException
bindex
- Relative index within base64 character unit; between 0
and 3 (as unit has exactly 4 characters)IllegalArgumentException
Copyright © 2012-2015 fasterxml.com. All Rights Reserved.