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

public Class CharArrayBase64Decoder

extends Base64DecoderBase
Class Inheritance
Imports
java.util.*, org.codehaus.stax2.typed.Base64Variant

Base64 decoder that can be used to decode base64 encoded content that is passed as char arrays.

Field Summary

Modifier and TypeField and Description
protected char[]
_currSegment

Text segment being currently processed.

protected int
protected int
protected int
protected int
protected int
_nextSegmentIndex

Pointer of the next segment to process (after current one stored in _currSegment) within _nextSegments.

protected final ArrayList<char[]>
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, char[] lastSegment, int lastOffset, int lastLen, List<char[]> segments)

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

Field Detail

_currSegmentback to summary
protected char[] _currSegment

Text segment being currently processed.

_currSegmentEndback to summary
protected int _currSegmentEnd
_currSegmentPtrback to summary
protected int _currSegmentPtr
_lastSegmentEndback to summary
protected int _lastSegmentEnd
_lastSegmentOffsetback to summary
protected int _lastSegmentOffset
_nextSegmentIndexback to summary
protected int _nextSegmentIndex

Pointer of the next segment to process (after current one stored in _currSegment) within _nextSegments.

_nextSegmentsback to summary
protected final ArrayList<char[]> _nextSegments

Constructor Detail

CharArrayBase64Decoderback to summary
public CharArrayBase64Decoder()

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, char[] lastSegment, int lastOffset, int lastLen, List<char[]> segments)
nextSegmentback to summary
private boolean nextSegment()