Class TempFileUnpackHandler
java.lang.Object
org.apache.tika.pipes.core.extractor.AbstractUnpackHandler
org.apache.tika.pipes.core.extractor.TempFileUnpackHandler
- All Implemented Interfaces:
Closeable, AutoCloseable, UnpackHandler
An UnpackHandler that writes embedded bytes to a temporary directory
for later zipping. Files are stored with their emit key names (flattened, with path
separators replaced).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordInformation about an embedded file stored in the temp directory. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int id, Metadata metadata, InputStream inputStream) voidclose()Returns information about all embedded files stored.Returns the temporary directory where embedded files are stored.booleanReturns true if there are any embedded files stored.Methods inherited from class AbstractUnpackHandler
getEmitKey, getIds
-
Constructor Details
-
TempFileUnpackHandler
public TempFileUnpackHandler(EmitKey containerEmitKey, UnpackConfig unpackConfig) throws IOException - Throws:
IOException
-
-
Method Details
-
add
- Specified by:
addin interfaceUnpackHandler- Overrides:
addin classAbstractUnpackHandler- Throws:
IOException
-
getTempDirectory
Returns the temporary directory where embedded files are stored. -
getEmbeddedFiles
Returns information about all embedded files stored. -
hasEmbeddedFiles
public boolean hasEmbeddedFiles()Returns true if there are any embedded files stored. -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-