org.apache.jackrabbit.core.query.lucene
Class TextExtractorJob
java.lang.Object
EDU.oswego.cs.dl.util.concurrent.FutureResult
org.apache.jackrabbit.core.query.lucene.TextExtractorJob
- All Implemented Interfaces:
- java.lang.Runnable
public class TextExtractorJob
- extends EDU.oswego.cs.dl.util.concurrent.FutureResult
- implements java.lang.Runnable
TextExtractorJob implements a future result and is runnable
in a background thread.
| Fields inherited from class EDU.oswego.cs.dl.util.concurrent.FutureResult |
exception_, ready_, value_ |
|
Constructor Summary |
TextExtractorJob(TextExtractor extractor,
java.io.InputStream stream,
java.lang.String type,
java.lang.String encoding)
Creates a new TextExtractorJob with the given
extractor on the stream. |
|
Method Summary |
java.io.Reader |
getReader(long timeout)
Returns the reader with the extracted text from the input stream passed
to the constructor of this TextExtractorJob. |
void |
run()
Runs the actual text extraction. |
java.lang.String |
toString()
|
| Methods inherited from class EDU.oswego.cs.dl.util.concurrent.FutureResult |
clear, doGet, get, getException, isReady, peek, set, setException, setter, timedGet |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TextExtractorJob
public TextExtractorJob(TextExtractor extractor,
java.io.InputStream stream,
java.lang.String type,
java.lang.String encoding)
- Creates a new
TextExtractorJob with the given
extractor on the stream.
- Parameters:
extractor - the text extractorstream - the stream of the binary property.type - the mime-type of the binary content.encoding - the encoding of the binary content. May be
null.
getReader
public java.io.Reader getReader(long timeout)
- Returns the reader with the extracted text from the input stream passed
to the constructor of this
TextExtractorJob. The caller of
this method is responsible for closing the returned reader. Returns
null if a timeoutoccurs while waiting for the
text extractor to get the reader.
- Returns:
- the Reader with the extracted text. Returns
null if
a timeout or an exception occured extracting the text.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- Returns:
- a String description for this job with the mime type.
run
public void run()
- Runs the actual text extraction.
- Specified by:
run in interface java.lang.Runnable
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.