Class ValueDecoderFactory.IntArrayDecoder
java.lang.Object
org.codehaus.stax2.typed.TypedArrayDecoder
org.codehaus.stax2.ri.typed.ValueDecoderFactory.BaseArrayDecoder
org.codehaus.stax2.ri.typed.ValueDecoderFactory.IntArrayDecoder
- Enclosing class:
ValueDecoderFactory
public static final class ValueDecoderFactory.IntArrayDecoder
extends ValueDecoderFactory.BaseArrayDecoder
- Since:
- 3.0
-
Field Summary
Fields inherited from class ValueDecoderFactory.BaseArrayDecoder
INITIAL_RESULT_BUFFER_SIZE, mCount, mEnd, mStart, SMALL_RESULT_BUFFER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionIntArrayDecoder(int[] result, int start, int maxCount, ValueDecoderFactory.IntDecoder intDecoder) Constructor used for constructing decoders with fixed pre-allocated result buffer.IntArrayDecoder(ValueDecoderFactory.IntDecoder intDecoder) Constructor used for constructing decoders with automatically adjusting result buffer -
Method Summary
Modifier and TypeMethodDescriptionbooleandecodeValue(char[] buffer, int start, int end) booleandecodeValue(String input) Method called to decode single (element) value that given textual input contains and store it in result array.voidexpand()Method that can be called if the internal result buffer fills up (whenValueDecoderFactory.BaseArrayDecoder.hasRoom()returns false) and will expand result buffer to hold at least one more value.int[]Methods inherited from class ValueDecoderFactory.BaseArrayDecoder
calcNewSize, getCount, hasRoom
-
Constructor Details
-
IntArrayDecoder
public IntArrayDecoder(int[] result, int start, int maxCount, ValueDecoderFactory.IntDecoder intDecoder) Constructor used for constructing decoders with fixed pre-allocated result buffer. -
IntArrayDecoder
Constructor used for constructing decoders with automatically adjusting result buffer
-
-
Method Details
-
expand
public void expand()Description copied from class:ValueDecoderFactory.BaseArrayDecoderMethod that can be called if the internal result buffer fills up (whenValueDecoderFactory.BaseArrayDecoder.hasRoom()returns false) and will expand result buffer to hold at least one more value.- Specified by:
expandin classValueDecoderFactory.BaseArrayDecoder
-
getValues
public int[] getValues() -
decodeValue
Description copied from class:TypedArrayDecoderMethod called to decode single (element) value that given textual input contains and store it in result array.- Specified by:
decodeValuein classTypedArrayDecoder- Returns:
- True if decoding is complete, that is, no more elements can be added to contained array
- Throws:
IllegalArgumentException
-
decodeValue
- Specified by:
decodeValuein classTypedArrayDecoder- Throws:
IllegalArgumentException
-