org.codehaus.stax2.ri.typed
public final class CharArrayBase64Decoder extends java.lang.Object
Constructor and Description |
---|
CharArrayBase64Decoder() |
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,
char[] lastSegment,
int lastOffset,
int lastLen,
java.util.List segments) |
protected java.lang.IllegalArgumentException |
reportInvalidChar(char ch,
int bindex) |
protected java.lang.IllegalArgumentException |
reportInvalidChar(char ch,
int bindex,
java.lang.String msg) |
public void init(Base64Variant variant, boolean firstChunk, char[] lastSegment, int lastOffset, int lastLen, java.util.List segments)
public int decode(byte[] resultBuffer, int resultOffset, int maxLength) throws java.lang.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 bufferjava.lang.IllegalArgumentException
public final boolean hasData()
public final int endOfContent()
public byte[] decodeCompletely()
public Stax2Util.ByteAggregator getByteAggregator()
protected java.lang.IllegalArgumentException reportInvalidChar(char ch, int bindex) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
protected java.lang.IllegalArgumentException reportInvalidChar(char ch, int bindex, java.lang.String msg) throws java.lang.IllegalArgumentException
bindex
- Relative index within base64 character unit; between 0
and 3 (as unit has exactly 4 characters)java.lang.IllegalArgumentException