Package org.codehaus.stax2.ri.typed
Class StringBase64Decoder
- java.lang.Object
-
- org.codehaus.stax2.ri.typed.Base64DecoderBase
-
- org.codehaus.stax2.ri.typed.StringBase64Decoder
-
public final class StringBase64Decoder extends Base64DecoderBase
Base64 decoder that can be used to decode base64 encoded content that is passed as a Single string.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
_currSegment
Base64 content String being currently processed.(package private) int
_currSegmentEnd
(package private) int
_currSegmentPtr
-
Fields inherited from class org.codehaus.stax2.ri.typed.Base64DecoderBase
_byteAggr, _decodedData, _state, _variant, INT_SPACE, STATE_INITIAL, STATE_OUTPUT_1, STATE_OUTPUT_2, STATE_OUTPUT_3, STATE_VALID_1, STATE_VALID_2, STATE_VALID_2_AND_PADDING, STATE_VALID_3
-
-
Constructor Summary
Constructors Constructor Description StringBase64Decoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
decode(byte[] resultBuffer, int resultOffset, int maxLength)
Method that does actual decodingvoid
init(Base64Variant variant, boolean firstChunk, java.lang.String segment)
-
Methods inherited from class org.codehaus.stax2.ri.typed.Base64DecoderBase
decodeCompletely, endOfContent, getByteAggregator, hasData, reportInvalidChar, reportInvalidChar
-
-
-
-
Method Detail
-
init
public void init(Base64Variant variant, boolean firstChunk, java.lang.String segment)
-
decode
public int decode(byte[] resultBuffer, int resultOffset, int maxLength) throws java.lang.IllegalArgumentException
Description copied from class:Base64DecoderBase
Method that does actual decoding- Specified by:
decode
in classBase64DecoderBase
- Parameters:
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 buffer- Returns:
- Number of bytes decoded and returned in the result buffer
- Throws:
java.lang.IllegalArgumentException
-
-