|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSpellTestCmdLine.TextRipper
private static class SpellTestCmdLine.TextRipper
Scans a directory for files, and rips text from all of them. The words are accessible in the form of an Iterator.
Field Summary | |
---|---|
(package private) Stack |
fileStack
|
(package private) String |
line
|
(package private) boolean |
more
|
(package private) BufferedReader |
reader
|
(package private) Pattern |
wordPat
Pattern for matching words |
(package private) Matcher |
words
|
(package private) Pattern |
xmlPat
Pattern for matching XML and HTML elements |
Constructor Summary | |
---|---|
SpellTestCmdLine.TextRipper(String dir)
|
Method Summary | |
---|---|
(package private) void |
advance()
Advance to the next word in the current file, or the next file if at the end of the current one. |
boolean |
hasNext()
Check if there's another word to get |
Object |
next()
Get the next word in the sequence |
(package private) boolean |
nextFile()
Scan to the next file in the sequence, and open it. |
void |
remove()
Not implemented |
(package private) String |
stripXML(String line)
Try to strip XML and HTML elements from a line |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Stack fileStack
BufferedReader reader
boolean more
String line
Matcher words
Pattern wordPat
final Pattern xmlPat
Constructor Detail |
---|
SpellTestCmdLine.TextRipper(String dir) throws IOException
IOException
Method Detail |
---|
boolean nextFile() throws IOException
IOException
void advance() throws IOException
IOException
String stripXML(String line)
public boolean hasNext()
hasNext
in interface Iterator
public Object next()
next
in interface Iterator
public void remove()
remove
in interface Iterator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |