|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectproguard.WordReader
public abstract class WordReader
An abstract reader of words, with the possibility to include other readers. Words are separated by spaces or broken off at delimiters. Words containing spaces or delimiters can be quoted with single or double quotes. Comments (everything starting with '#' on a single line) are ignored.
| Constructor Summary | |
|---|---|
protected |
WordReader(java.io.File baseDir)
Creates a new WordReader with the given base directory. |
| Method Summary | |
|---|---|
void |
close()
Closes the FileWordReader. |
java.io.File |
getBaseDir()
Returns the base directory of this reader, if any. |
void |
includeWordReader(WordReader newIncludeWordReader)
Specifies to start reading words from the given WordReader. |
java.lang.String |
lastComments()
Returns the comments collected before returning the last word. |
protected abstract java.lang.String |
lineLocationDescription()
Returns a readable description of the current WordReader position. |
java.lang.String |
locationDescription()
Constructs a readable description of the current position in this WordReader and its included WordReader objects. |
protected abstract java.lang.String |
nextLine()
Reads a line from this WordReader, or from one of its active included WordReader objects. |
java.lang.String |
nextWord()
Reads a word from this WordReader, or from one of its active included WordReader objects. |
void |
setBaseDir(java.io.File baseDir)
Sets the base directory of this reader. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected WordReader(java.io.File baseDir)
| Method Detail |
|---|
public void setBaseDir(java.io.File baseDir)
public java.io.File getBaseDir()
public void includeWordReader(WordReader newIncludeWordReader)
newIncludeWordReader - the WordReader that will start reading words.
public java.lang.String nextWord()
throws java.io.IOException
java.io.IOException
public java.lang.String lastComments()
throws java.io.IOException
null if there weren't any.
java.io.IOExceptionpublic java.lang.String locationDescription()
protected abstract java.lang.String nextLine()
throws java.io.IOException
java.io.IOExceptionprotected abstract java.lang.String lineLocationDescription()
public void close()
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||