Package org.codehaus.stax2.ri.typed
Class StringBase64Decoder
java.lang.Object
org.codehaus.stax2.ri.typed.Base64DecoderBase
org.codehaus.stax2.ri.typed.StringBase64Decoder
Base64 decoder that can be used to decode base64 encoded content that
is passed as a Single string.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) String
Base64 content String being currently processed.(package private) int
(package private) int
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 -
Method Summary
Modifier and TypeMethodDescriptionint
decode
(byte[] resultBuffer, int resultOffset, int maxLength) Method that does actual decodingvoid
init
(Base64Variant variant, boolean firstChunk, String segment) Methods inherited from class org.codehaus.stax2.ri.typed.Base64DecoderBase
decodeCompletely, endOfContent, getByteAggregator, hasData, reportInvalidChar, reportInvalidChar
-
Field Details
-
_currSegment
String _currSegmentBase64 content String being currently processed. -
_currSegmentPtr
int _currSegmentPtr -
_currSegmentEnd
int _currSegmentEnd
-
-
Constructor Details
-
StringBase64Decoder
public StringBase64Decoder()
-
-
Method Details
-
init
-
decode
public int decode(byte[] resultBuffer, int resultOffset, int maxLength) throws 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:
IllegalArgumentException
-