Package org.glassfish.json
Class JsonTokenizer
- java.lang.Object
-
- org.glassfish.json.JsonTokenizer
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
final class JsonTokenizer extends java.lang.Object implements java.io.Closeable
JSON Tokenizer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
JsonTokenizer.JsonToken
-
Field Summary
Fields Modifier and Type Field Description private java.math.BigDecimal
bd
private char[]
buf
private long
bufferOffset
private BufferPool
bufferPool
private boolean
fracOrExp
private static int[]
HEX
private static int
HEX_LENGTH
private long
lastLineOffset
private long
lineNo
private boolean
minus
private int
readBegin
private int
readEnd
private java.io.Reader
reader
private int
storeBegin
private int
storeEnd
-
Constructor Summary
Constructors Constructor Description JsonTokenizer(java.io.Reader reader, BufferPool bufferPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private JsonParsingException
expectedChar(int unexpected, char expected)
private int
fillBuf()
(package private) java.math.BigDecimal
getBigDecimal()
(package private) int
getInt()
(package private) JsonLocation
getLastCharLocation()
(package private) JsonLocation
getLocation()
(package private) long
getLong()
(package private) java.lang.String
getValue()
(package private) boolean
hasNextToken()
(package private) boolean
isDefinitelyInt()
(package private) boolean
isDefinitelyLong()
(package private) boolean
isIntegral()
(package private) JsonTokenizer.JsonToken
nextToken()
private int
peek()
private int
read()
private void
readFalse()
private void
readNull()
private void
readNumber(int ch)
private int
readNumberChar()
private void
readString()
private void
readTrue()
private void
reset()
private void
unescape()
private JsonParsingException
unexpectedChar(int ch)
-
-
-
Field Detail
-
HEX
private static final int[] HEX
-
HEX_LENGTH
private static final int HEX_LENGTH
-
bufferPool
private final BufferPool bufferPool
-
reader
private final java.io.Reader reader
-
buf
private char[] buf
-
readBegin
private int readBegin
-
readEnd
private int readEnd
-
storeBegin
private int storeBegin
-
storeEnd
private int storeEnd
-
lineNo
private long lineNo
-
lastLineOffset
private long lastLineOffset
-
bufferOffset
private long bufferOffset
-
minus
private boolean minus
-
fracOrExp
private boolean fracOrExp
-
bd
private java.math.BigDecimal bd
-
-
Constructor Detail
-
JsonTokenizer
JsonTokenizer(java.io.Reader reader, BufferPool bufferPool)
-
-
Method Detail
-
readString
private void readString()
-
unescape
private void unescape()
-
readNumberChar
private int readNumberChar()
-
readNumber
private void readNumber(int ch)
-
readTrue
private void readTrue()
-
readFalse
private void readFalse()
-
readNull
private void readNull()
-
nextToken
JsonTokenizer.JsonToken nextToken()
-
hasNextToken
boolean hasNextToken()
-
peek
private int peek()
-
getLastCharLocation
JsonLocation getLastCharLocation()
-
getLocation
JsonLocation getLocation()
-
read
private int read()
-
fillBuf
private int fillBuf() throws java.io.IOException
- Throws:
java.io.IOException
-
reset
private void reset()
-
getValue
java.lang.String getValue()
-
getBigDecimal
java.math.BigDecimal getBigDecimal()
-
getInt
int getInt()
-
getLong
long getLong()
-
isDefinitelyInt
boolean isDefinitelyInt()
-
isDefinitelyLong
boolean isDefinitelyLong()
-
isIntegral
boolean isIntegral()
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
unexpectedChar
private JsonParsingException unexpectedChar(int ch)
-
expectedChar
private JsonParsingException expectedChar(int unexpected, char expected)
-
-