public class TextReader extends Object
| Constructor and Description |
|---|
TextReader(Reader reader)
Constructor
|
TextReader(Reader reader,
boolean includeQuotes)
Constructor
|
TextReader(String text)
Constructor
|
TextReader(String text,
boolean includeQuotes)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the text reader
|
Reader |
getReader()
Get the reader
|
boolean |
isIncludeQuotes()
Is include quotes enabled
|
String |
peekExpectedToken()
Peek at the next expected token without reading past it
|
String |
peekExpectedToken(int num)
Peek at the next expected token without reading past it
|
String |
peekToken()
Peek at the next token without reading past it
|
String |
peekToken(int num)
Peek at a token without reading past it
|
void |
pushToken(String token)
Push a token back onto the read cache
|
String |
readExpectedToken()
Read an expected token
|
int |
readInteger()
Read a signed integer
|
double |
readNumber()
Read a signed number as a double
|
String |
readToken()
Read the next token.
|
int |
readUnsignedInteger()
Read an unsigned integer
|
double |
readUnsignedNumber()
Read an unsigned number as a double
|
void |
reset()
Reset the reader
|
void |
setIncludeQuotes(boolean includeQuotes)
Set the include quotes setting
|
public TextReader(String text)
text - textpublic TextReader(Reader reader)
reader - readerpublic TextReader(String text, boolean includeQuotes)
text - textincludeQuotes - include quotespublic TextReader(Reader reader, boolean includeQuotes)
reader - readerincludeQuotes - include quotespublic Reader getReader()
public boolean isIncludeQuotes()
public void setIncludeQuotes(boolean includeQuotes)
includeQuotes - true to include quotespublic void reset()
throws IOException
IOException - upon reset errorpublic void close()
public String readToken() throws IOException
IOException - upon read errorpublic String peekToken() throws IOException
IOException - upon read errorpublic String peekToken(int num) throws IOException
num - number of tokens out to peek atIOException - upon read errorpublic void pushToken(String token)
token - tokenpublic String readExpectedToken() throws IOException
IOException - upon read errorpublic String peekExpectedToken() throws IOException
IOException - upon read errorpublic String peekExpectedToken(int num) throws IOException
num - number of tokens out to peek atIOException - upon read errorpublic double readNumber()
throws IOException
IOException - upon failure to readpublic double readUnsignedNumber()
throws IOException
IOException - upon failure to readpublic int readInteger()
throws IOException
IOException - upon failure to readpublic int readUnsignedInteger()
throws IOException
IOException - upon failure to readCopyright © 2021 National Geospatial-Intelligence Agency. All rights reserved.