Package com.yahoo.document.json
Class TokenBuffer
- java.lang.Object
-
- com.yahoo.document.json.TokenBuffer
-
public class TokenBuffer extends Object
Helper class to enable lookahead in the token stream.- Author:
- Steinar Knutsen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TokenBuffer.Token
-
Constructor Summary
Constructors Constructor Description TokenBuffer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bufferArray(com.fasterxml.jackson.core.JsonToken first, com.fasterxml.jackson.core.JsonParser tokens)
void
bufferObject(com.fasterxml.jackson.core.JsonToken first, com.fasterxml.jackson.core.JsonParser tokens)
String
currentName()
Returns the current token name without changing position, or null if noneString
currentText()
Returns the current token text without changing position, or null if nonecom.fasterxml.jackson.core.JsonToken
currentToken()
Returns the current token without changing position, or null if noneString
dumpContents()
void
fastForwardToEndObject()
boolean
isEmpty()
Returns whether any tokens are available in thisint
nesting()
com.fasterxml.jackson.core.JsonToken
next()
TokenBuffer
prefetchCurrentElement()
TokenBuffer.Token
prefetchScalar(String name)
int
size()
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Returns whether any tokens are available in this
-
next
public com.fasterxml.jackson.core.JsonToken next()
-
currentToken
public com.fasterxml.jackson.core.JsonToken currentToken()
Returns the current token without changing position, or null if none
-
currentName
public String currentName()
Returns the current token name without changing position, or null if none
-
currentText
public String currentText()
Returns the current token text without changing position, or null if none
-
size
public int size()
-
bufferObject
public void bufferObject(com.fasterxml.jackson.core.JsonToken first, com.fasterxml.jackson.core.JsonParser tokens)
-
bufferArray
public void bufferArray(com.fasterxml.jackson.core.JsonToken first, com.fasterxml.jackson.core.JsonParser tokens)
-
nesting
public int nesting()
-
dumpContents
public String dumpContents()
-
fastForwardToEndObject
public void fastForwardToEndObject()
-
prefetchCurrentElement
public TokenBuffer prefetchCurrentElement()
-
prefetchScalar
public TokenBuffer.Token prefetchScalar(String name)
-
-