textmaven.application.analyzer
Class TextReader

java.lang.Object
  extended bytextmaven.application.analyzer.TextReader
All Implemented Interfaces:
ITextReader

public class TextReader
extends java.lang.Object
implements ITextReader

Reads a ASCII text. Upon reading registered {link ITextHandler} are called on the events specified in the ITextHandler interface.

Author:
krebtho

Constructor Summary
TextReader()
           
 
Method Summary
protected  void _process(java.io.Reader in)
          Reads specified input.
 void addListener(ITextHandler aListener)
          Specified listener will receive ITextHandler while reading the document
 void process(java.io.InputStream in)
          Reads the complete stream, and calls the appropriate methods of all registered ITextHandlers.
 void process(java.io.Reader in)
          see process(InputStream).
 void removeAllListeners()
          Removes all listeners.
 void removeListener(ITextHandler aListener)
          Removes the specified listener, which will not receive events any further.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextReader

public TextReader()
Method Detail

addListener

public void addListener(ITextHandler aListener)
Specified listener will receive ITextHandler while reading the document

Specified by:
addListener in interface ITextReader
Parameters:
aListener - listener to which events will be passed

removeListener

public void removeListener(ITextHandler aListener)
Removes the specified listener, which will not receive events any further.

Specified by:
removeListener in interface ITextReader
Parameters:
aListener - listener instance to be removed

removeAllListeners

public void removeAllListeners()
Removes all listeners.

Specified by:
removeAllListeners in interface ITextReader

process

public void process(java.io.InputStream in)
Reads the complete stream, and calls the appropriate methods of all registered ITextHandlers. This instance does not support the events ITextHandler.endParagraph() and ITextHandler.heading(int, java.lang.String).

Specified by:
process in interface ITextReader
Parameters:
in - input stream to be read

process

public void process(java.io.Reader in)
see process(InputStream).

Specified by:
process in interface ITextReader
Parameters:
in - reader to be read

_process

protected void _process(java.io.Reader in)
Reads specified input.

Parameters:
in - reader from which to read


Copyright © 2002-2005 Sourceforge. All Rights Reserved.