Package org.apache.tika.batch.fs
Class FSOutputStreamFactory
- java.lang.Object
- 
- org.apache.tika.batch.fs.FSOutputStreamFactory
 
- 
- All Implemented Interfaces:
- OutputStreamFactory
 
 public class FSOutputStreamFactory extends Object implements OutputStreamFactory 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classFSOutputStreamFactory.COMPRESSION
 - 
Constructor SummaryConstructors Constructor Description FSOutputStreamFactory(Path outputRoot, FSUtil.HANDLE_EXISTING handleExisting, FSOutputStreamFactory.COMPRESSION compression, String suffix)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputStreamgetOutputStream(Metadata metadata)This tries to create a file based on theFSUtil.HANDLE_EXISTINGvalue that was passed in during initialization.
 
- 
- 
- 
Constructor Detail- 
FSOutputStreamFactorypublic FSOutputStreamFactory(Path outputRoot, FSUtil.HANDLE_EXISTING handleExisting, FSOutputStreamFactory.COMPRESSION compression, String suffix) 
 
- 
 - 
Method Detail- 
getOutputStreampublic OutputStream getOutputStream(Metadata metadata) throws IOException This tries to create a file based on theFSUtil.HANDLE_EXISTINGvalue that was passed in during initialization.If handleExistingis set to "SKIP" and the output file already exists, this will return null.If an output file can be found, this will try to mkdirs for that output file. If mkdirs() fails, this will throw an IOException. Finally, this will open an output stream for the appropriate output file. - Specified by:
- getOutputStreamin interface- OutputStreamFactory
- Parameters:
- metadata- must have a value set for FSMetadataProperties.FS_ABSOLUTE_PATH or else NullPointerException will be thrown!
- Returns:
- OutputStream
- Throws:
- IOException
 
 
- 
 
-