public class BasicTikaFSConsumer extends AbstractFSConsumer
This catches all exceptions and errors and then logs them. This will re-throw errors.
ELAPSED_MILLIS, IO_IS, IO_OS, LOG, OOM, PARSE_ERR, PARSE_EX, TIMED_OUT
Constructor and Description |
---|
BasicTikaFSConsumer(ArrayBlockingQueue<FileResource> queue,
Parser parser,
ContentHandlerFactory contentHandlerFactory,
OutputStreamFactory fsOSFactory) |
BasicTikaFSConsumer(ArrayBlockingQueue<FileResource> queue,
ParserFactory parserFactory,
ContentHandlerFactory contentHandlerFactory,
OutputStreamFactory fsOSFactory,
TikaConfig tikaConfig)
|
Modifier and Type | Method and Description |
---|---|
Charset |
getOutputEncoding() |
boolean |
processFileResource(FileResource fileResource)
Main piece of code that needs to be implemented.
|
void |
setOutputEncoding(Charset charset) |
getInputStream, getOutputStream
call, checkForTimedOutMillis, close, flushAndClose, getCurrentFile, getNumHandledExceptions, getNumResourcesConsumed, getXMLifiedLogMsg, getXMLifiedLogMsg, incrementHandledExceptions, isStillActive, parse, pleaseShutdown
@Deprecated public BasicTikaFSConsumer(ArrayBlockingQueue<FileResource> queue, ParserFactory parserFactory, ContentHandlerFactory contentHandlerFactory, OutputStreamFactory fsOSFactory, TikaConfig tikaConfig)
BasicTikaFSConsumer(ArrayBlockingQueue,
Parser, ContentHandlerFactory, OutputStreamFactory)
queue
- parserFactory
- contentHandlerFactory
- fsOSFactory
- tikaConfig
- public BasicTikaFSConsumer(ArrayBlockingQueue<FileResource> queue, Parser parser, ContentHandlerFactory contentHandlerFactory, OutputStreamFactory fsOSFactory)
public boolean processFileResource(FileResource fileResource)
FileResourceConsumer
FileResourceConsumer.incrementHandledExceptions()
appropriately in
your implementation of this method.
processFileResource
in class FileResourceConsumer
fileResource
- resource to processpublic Charset getOutputEncoding()
public void setOutputEncoding(Charset charset)
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.