Package org.codehaus.jackson.util
Class TokenBuffer.Segment
java.lang.Object
org.codehaus.jackson.util.TokenBuffer.Segment
- Enclosing class:
TokenBuffer
Individual segment of TokenBuffer that can store up to 16 tokens
(limited by 4 bits per token type marker requirement).
Current implementation uses fixed length array; could alternatively
use 16 distinct fields and switch statement (slightly more efficient
storage, slightly slower access)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TokenBuffer.Segment
protected final Object[]
protected long
Bit field used to store types of buffered tokens; 4 bits per token.static final int
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
TOKENS_PER_SEGMENT
public static final int TOKENS_PER_SEGMENT- See Also:
-
_next
-
_tokenTypes
protected long _tokenTypesBit field used to store types of buffered tokens; 4 bits per token. Value 0 is reserved for "not in use" -
_tokens
-
-
Constructor Details
-
Segment
public Segment()
-
-
Method Details
-
type
-
get
-
next
-
append
-
append
-
set
-
set
-