Top Description Fields Constructors Methods
org.codehaus.stax2.ri.typed

public final Class StringBase64Decoder

extends Base64DecoderBase
Class Inheritance
Imports
org.codehaus.stax2.typed.Base64Variant

Base64 decoder that can be used to decode base64 encoded content that is passed as a Single string.

Field Summary

Modifier and TypeField and Description
pack-priv String
_currSegment

Base64 content String being currently processed.

pack-priv int
pack-priv int
Inherited from org.codehaus.stax2.ri.typed.Base64DecoderBase:
_byteAggr_decodedData_state_variantINT_SPACESTATE_INITIALSTATE_OUTPUT_1STATE_OUTPUT_2STATE_OUTPUT_3STATE_VALID_1STATE_VALID_2STATE_VALID_2_AND_PADDINGSTATE_VALID_3

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

Number of bytes decoded and returned in the result buffer
decode
(byte[]
Buffer in which decoded bytes are returned
resultBuffer
,
int
Offset that points to position to put the first decoded byte in maxLength Maximum number of bytes that can be returned in given buffer
resultOffset
,
int maxLength)

Implements abstract org.codehaus.stax2.ri.typed.Base64DecoderBase.decode.

Method that does actual decoding
public void
init(Base64Variant variant, boolean firstChunk, String segment)

Inherited from org.codehaus.stax2.ri.typed.Base64DecoderBase:
decodeCompletelyendOfContentgetByteAggregatorhasDatareportInvalidCharreportInvalidChar

Field Detail

_currSegmentback to summary
pack-priv String _currSegment

Base64 content String being currently processed.

_currSegmentEndback to summary
pack-priv int _currSegmentEnd
_currSegmentPtrback to summary
pack-priv int _currSegmentPtr

Constructor Detail

StringBase64Decoderback to summary
public StringBase64Decoder()

Method Detail

decodeback to summary
public int decode(byte[] resultBuffer, int resultOffset, int maxLength) throws IllegalArgumentException

Implements abstract org.codehaus.stax2.ri.typed.Base64DecoderBase.decode.

Doc from org.codehaus.stax2.ri.typed.Base64DecoderBase.decode.

Method that does actual decoding

Parameters
resultBuffer:byte[]

Buffer in which decoded bytes are returned

resultOffset:int

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:int

Number of bytes decoded and returned in the result buffer

Annotations
@Override
initback to summary
public void init(Base64Variant variant, boolean firstChunk, String segment)