|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.mif.MIFStringTokenizer
Simple tokenizer class
Constructor Summary | |
MIFStringTokenizer()
Builds a tokenizer |
Method Summary | |
java.lang.String |
getLine()
DOCUMENT ME! |
protected java.lang.String |
getToken()
DOCUMENT ME! |
protected java.lang.String |
getToken(char separator)
DOCUMENT ME! |
protected java.lang.String |
getToken(char separator,
boolean nextLineIfEmpty)
DOCUMENT ME! |
java.lang.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 java.lang.String |
ltrim(java.lang.String untrimmed)
|
void |
putToken(java.lang.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(java.lang.String line)
"Reads" a line from the given line, and initializes the token. |
static java.lang.String |
strQuote(java.lang.String unquoted)
DOCUMENT ME! |
static java.lang.String |
strUnquote(java.lang.String quoted)
DOCUMENT ME! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MIFStringTokenizer()
Method Detail |
public boolean readLine(java.lang.String line)
line
-
public boolean readLine()
public java.lang.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 java.lang.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 java.lang.String getToken(char separator) throws com.vividsolutions.jts.io.ParseException
separator
- DOCUMENT ME!
com.vividsolutions.jts.io.ParseException
- DOCUMENT ME!protected java.lang.String getToken() throws com.vividsolutions.jts.io.ParseException
com.vividsolutions.jts.io.ParseException
- DOCUMENT ME!public void putToken(java.lang.String tok)
tok
- The token which has to be put back in the input bufferpublic static java.lang.String strQuote(java.lang.String unquoted)
unquoted
- DOCUMENT ME!
public static java.lang.String strUnquote(java.lang.String quoted)
quoted
- DOCUMENT ME!
public static java.lang.String ltrim(java.lang.String untrimmed)
public java.lang.String getLine()
public boolean isEmpty()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |