public class BasicTikaFSConsumer extends AbstractFSConsumer
This catches all exceptions and errors and then logs them. This will re-throw errors.
| Modifier and Type | Field and Description |
|---|---|
private TikaConfig |
config |
private ContentHandlerFactory |
contentHandlerFactory |
private OutputStreamFactory |
fsOSFactory |
private java.lang.String |
outputEncoding |
private boolean |
parseRecursively |
private ParserFactory |
parserFactory |
ELAPSED_MILLIS, IO_IS, IO_OS, LOG, OOM, PARSE_ERR, PARSE_EX, TIMED_OUT| Constructor and Description |
|---|
BasicTikaFSConsumer(java.util.concurrent.ArrayBlockingQueue<FileResource> queue,
ParserFactory parserFactory,
ContentHandlerFactory contentHandlerFactory,
OutputStreamFactory fsOSFactory,
TikaConfig config) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getOutputEncoding() |
boolean |
processFileResource(FileResource fileResource)
Main piece of code that needs to be implemented.
|
void |
setOutputEncoding(java.lang.String outputEncoding) |
getInputStream, getOutputStreamcall, checkForTimedOutMillis, close, flushAndClose, getCurrentFile, getNumHandledExceptions, getNumResourcesConsumed, getXMLifiedLogMsg, getXMLifiedLogMsg, incrementHandledExceptions, isStillActive, parse, pleaseShutdownprivate boolean parseRecursively
private final ParserFactory parserFactory
private final ContentHandlerFactory contentHandlerFactory
private final OutputStreamFactory fsOSFactory
private final TikaConfig config
private java.lang.String outputEncoding
public BasicTikaFSConsumer(java.util.concurrent.ArrayBlockingQueue<FileResource> queue, ParserFactory parserFactory, ContentHandlerFactory contentHandlerFactory, OutputStreamFactory fsOSFactory, TikaConfig config)
public boolean processFileResource(FileResource fileResource)
FileResourceConsumerFileResourceConsumer.incrementHandledExceptions() appropriately in
your implementation of this method.
processFileResource in class FileResourceConsumerfileResource - resource to processpublic java.lang.String getOutputEncoding()
public void setOutputEncoding(java.lang.String outputEncoding)