Package org.apache.tika.batch.fs
Class AbstractFSConsumer
- java.lang.Object
- 
- org.apache.tika.batch.FileResourceConsumer
- 
- org.apache.tika.batch.fs.AbstractFSConsumer
 
 
- 
- All Implemented Interfaces:
- Callable<IFileProcessorFutureResult>
 - Direct Known Subclasses:
- BasicTikaFSConsumer,- RecursiveParserWrapperFSConsumer,- StreamOutRPWFSConsumer
 
 public abstract class AbstractFSConsumer extends FileResourceConsumer 
- 
- 
Field Summary- 
Fields inherited from class org.apache.tika.batch.FileResourceConsumerELAPSED_MILLIS, IO_IS, IO_OS, LOG, OOM, PARSE_ERR, PARSE_EX, TIMED_OUT
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractFSConsumer(ArrayBlockingQueue<FileResource> fileQueue)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStreamgetInputStream(FileResource fileResource)protected OutputStreamgetOutputStream(OutputStreamFactory fsOSFactory, FileResource fileResource)Use this for consistent logging of exceptions.- 
Methods inherited from class org.apache.tika.batch.FileResourceConsumercall, checkForTimedOutMillis, close, flushAndClose, getCurrentFile, getNumHandledExceptions, getNumResourcesConsumed, getXMLifiedLogMsg, getXMLifiedLogMsg, incrementHandledExceptions, isStillActive, parse, pleaseShutdown, processFileResource
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractFSConsumerpublic AbstractFSConsumer(ArrayBlockingQueue<FileResource> fileQueue) 
 
- 
 - 
Method Detail- 
getOutputStreamprotected OutputStream getOutputStream(OutputStreamFactory fsOSFactory, FileResource fileResource) Use this for consistent logging of exceptions. Clients must check for whether the os is null, which is the signal that the output file already exists and should be skipped.- Parameters:
- fsOSFactory- factory that creates the outputstream
- fileResource- used by the OSFactory to create the stream
- Returns:
- the OutputStream or null if the output file already exists
 
 - 
getInputStreamprotected InputStream getInputStream(FileResource fileResource) - Parameters:
- fileResource-
- Returns:
- inputStream, can be null if there is an exception opening IS
 
 
- 
 
-