public class BC_MIFStringTokenizer extends Object
Modifier and Type | Field and Description |
---|---|
private String |
lastToken |
private String |
line |
Constructor and Description |
---|
BC_MIFStringTokenizer()
Builds a tokenizer
|
Modifier and Type | Method and Description |
---|---|
String |
getLine()
DOCUMENT ME!
|
protected String |
getToken()
DOCUMENT ME!
|
protected String |
getToken(char separator)
DOCUMENT ME!
|
protected String |
getToken(char separator,
boolean nextLineIfEmpty)
DOCUMENT ME!
|
String |
getToken(char separator,
boolean nextLineIfEmpty,
boolean quotedStrings)
Cuts the first token from line buffer using the given separator, taking
in to account string delimiters if needed
Strings might be delimited by double quotes. |
boolean |
isEmpty()
Check for non-empty line buffer
|
static String |
ltrim(String untrimmed) |
void |
putToken(String tok)
Puts a token back to the input buffer so that the next call to getToken
will return this token
|
boolean |
readLine()
Tries to read a line from the input buffer (if any) and store it in the
line buffer
|
boolean |
readLine(String line)
"Reads" a line from the given line, and initializes the token.
|
static String |
strQuote(String unquoted)
DOCUMENT ME!
|
static String |
strUnquote(String quoted)
DOCUMENT ME!
|
public boolean readLine(String line)
line
- die zu analysierende Textzeilepublic boolean readLine()
public String getToken(char separator, boolean nextLineIfEmpty, boolean quotedStrings) throws com.vividsolutions.jts.io.ParseException
separator
- Character used as token separator.nextLineIfEmpty
- If the returned token is empty, try to read it from the next
line.quotedStrings
- If true, expects a quoted string and read it, otherwise treats
the double quotes as a normal char.com.vividsolutions.jts.io.ParseException
- DOCUMENT ME!protected String getToken(char separator, boolean nextLineIfEmpty) throws com.vividsolutions.jts.io.ParseException
separator
- DOCUMENT ME!nextLineIfEmpty
- DOCUMENT ME!com.vividsolutions.jts.io.ParseException
- DOCUMENT ME!protected String getToken(char separator) throws com.vividsolutions.jts.io.ParseException
separator
- DOCUMENT ME!com.vividsolutions.jts.io.ParseException
- DOCUMENT ME!protected String getToken() throws com.vividsolutions.jts.io.ParseException
com.vividsolutions.jts.io.ParseException
- DOCUMENT ME!public void putToken(String tok)
tok
- The token which has to be put back in the input bufferpublic static String strQuote(String unquoted)
unquoted
- DOCUMENT ME!public static String strUnquote(String quoted)
quoted
- DOCUMENT ME!public String getLine()
public boolean isEmpty()
Copyright © 2017 BitCtrl Systems GmbH. All rights reserved.