Package org.codehaus.stax2.ri.typed
Class ValueEncoderFactory.ArrayEncoder
- java.lang.Object
-
- org.codehaus.stax2.ri.typed.AsciiValueEncoder
-
- org.codehaus.stax2.ri.typed.ValueEncoderFactory.ArrayEncoder
-
- Direct Known Subclasses:
ValueEncoderFactory.DoubleArrayEncoder,ValueEncoderFactory.FloatArrayEncoder,ValueEncoderFactory.IntArrayEncoder,ValueEncoderFactory.LongArrayEncoder
- Enclosing class:
- ValueEncoderFactory
abstract static class ValueEncoderFactory.ArrayEncoder extends AsciiValueEncoder
Intermediate base class for encoders that deal with arrays of values.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int_end(package private) int_ptr-
Fields inherited from class org.codehaus.stax2.ri.typed.AsciiValueEncoder
MIN_CHARS_WITHOUT_FLUSH
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedArrayEncoder(int ptr, int end)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intencodeMore(char[] buffer, int ptr, int end)booleanisCompleted()Method that can alternatively be called to determine whether encoder has encoded all data it has.-
Methods inherited from class org.codehaus.stax2.ri.typed.AsciiValueEncoder
bufferNeedsFlush, encodeMore
-
-
-
-
Method Detail
-
isCompleted
public final boolean isCompleted()
Description copied from class:AsciiValueEncoderMethod that can alternatively be called to determine whether encoder has encoded all data it has. Generally called right after a call toAsciiValueEncoder.encodeMore(char[], int, int), to figure out whether buffer flush is needed (there is more data), or encoding is complete.- Specified by:
isCompletedin classAsciiValueEncoder
-
encodeMore
public abstract int encodeMore(char[] buffer, int ptr, int end)- Specified by:
encodeMorein classAsciiValueEncoder- Returns:
- Value of pointer after all remaining data (which
may be "none") that can be encoded (as constrained by
buffer length) has been encoded. Has to exceed 'ptr'
value sent in; will be equal to it if nothing was
encoded (which should only occur when everything has
been encoded, as long as
AsciiValueEncoder.bufferNeedsFlush(int)is appropriately called once before calling this method)
-
-