|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sen.StreamTagger
public class StreamTagger
Tokenizes text read from a java.io.Reader
See examples.StreamTaggerDemo in the Sen source for an example of how to use this class
Thread Safety: Objects of this class are NOT thread safe and
should not be accessed simultaneously by multiple threads. Note that creating
additional instances using SenFactory is relatively cheap in both
memory and time
| Constructor Summary | |
|---|---|
StreamTagger(StringTagger stringTagger,
Reader reader)
|
|
| Method Summary | |
|---|---|
void |
addFilter(StreamFilter filter)
Adds a StreamFilter |
boolean |
hasNext()
Tests if more Tokens are available |
Token |
next()
Returns the next available token |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamTagger(StringTagger stringTagger,
Reader reader)
stringTagger - The StringTagger to use to tokenise the read textreader - The Reader to read text from| Method Detail |
|---|
public boolean hasNext()
throws IOException
Tokens are available
true if more Tokens are available, otherwise
false
IOException
public Token next()
throws IOException
IOExceptionpublic void addFilter(StreamFilter filter)
StreamFilter
filter - The StreamFilter to add
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||