|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.unikiel.ipn.htmlform.PDFParser
Used to extract text from a pdf.
The extraction method is run(). It should be launched
in a seperate thread.
Constructor Summary | |
(package private) |
PDFParser(java.io.File file,
MessageHandler handler)
Create a new PDFParser. |
Method Summary | |
void |
handleMessage(Message msg)
Handles the Message or forwards it to the successor. |
void |
run()
Extracts the text from the pdf. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
PDFParser(java.io.File file, MessageHandler handler)
file
- pdf-file to parse fromhandler
- The run-method will pass Messages to this handler.
java.lang.NullPointerException
- if file == null
or handler == null
run()
Method Detail |
public void run()
Message.ERROR_MESSAGE
to the
successing MessageHandler specified in the constructor.
Finally it will always pass a
Message.RESULT_MESSAGE
to the successing MessageHandler specified in the constructor.
That Message will contain the content of the parsed pdf
or an empty string if anything went wrong.
run
in interface java.lang.Runnable
Message
public void handleMessage(Message msg)
MessageHandler
handleMessage
in interface MessageHandler
msg
- the Message that has to be handled.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |