Package org.codehaus.stax2.ri.typed
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
-
-
Field Summary
-
Fields inherited from class org.codehaus.stax2.ri.typed.ValueDecoderFactory.BaseArrayDecoder
INITIAL_RESULT_BUFFER_SIZE, mCount, mEnd, mStart, SMALL_RESULT_BUFFER_SIZE
-
-
Constructor Summary
Constructors Constructor Description IntArrayDecoder(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
decodeValue(char[] buffer, int start, int end)
boolean
decodeValue(java.lang.String input)
Method called to decode single (element) value that given textual input contains and store it in result array.void
expand()
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[]
getValues()
-
Methods inherited from class org.codehaus.stax2.ri.typed.ValueDecoderFactory.BaseArrayDecoder
calcNewSize, getCount, hasRoom
-
-
-
-
Constructor Detail
-
IntArrayDecoder
public IntArrayDecoder(int[] result, int start, int maxCount, ValueDecoderFactory.IntDecoder intDecoder)
Constructor used for constructing decoders with fixed pre-allocated result buffer.
-
IntArrayDecoder
public IntArrayDecoder(ValueDecoderFactory.IntDecoder intDecoder)
Constructor used for constructing decoders with automatically adjusting result buffer
-
-
Method Detail
-
expand
public void expand()
Description copied from class:ValueDecoderFactory.BaseArrayDecoder
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.- Specified by:
expand
in classValueDecoderFactory.BaseArrayDecoder
-
getValues
public int[] getValues()
-
decodeValue
public boolean decodeValue(java.lang.String input) throws java.lang.IllegalArgumentException
Description copied from class:TypedArrayDecoder
Method called to decode single (element) value that given textual input contains and store it in result array.- Specified by:
decodeValue
in classTypedArrayDecoder
- Returns:
- True if decoding is complete, that is, no more elements can be added to contained array
- Throws:
java.lang.IllegalArgumentException
-
decodeValue
public boolean decodeValue(char[] buffer, int start, int end) throws java.lang.IllegalArgumentException
- Specified by:
decodeValue
in classTypedArrayDecoder
- Throws:
java.lang.IllegalArgumentException
-
-