Package org.apache.tika.extractor
Class BasicEmbeddedDocumentBytesHandler
- java.lang.Object
-
- org.apache.tika.extractor.AbstractEmbeddedDocumentBytesHandler
-
- org.apache.tika.extractor.BasicEmbeddedDocumentBytesHandler
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,EmbeddedDocumentBytesHandler
public class BasicEmbeddedDocumentBytesHandler extends AbstractEmbeddedDocumentBytesHandler
For now, this is an in-memory EmbeddedDocumentBytesHandler that stores all the bytes in memory. Users can retrieve the documents withgetDocument(int)
. We'll need to make this cache to disk at some point if there are many bytes of embedded documents.
-
-
Constructor Summary
Constructors Constructor Description BasicEmbeddedDocumentBytesHandler(EmbeddedDocumentBytesConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int id, Metadata metadata, InputStream is)
void
close()
InputStream
getDocument(int id)
-
Methods inherited from class org.apache.tika.extractor.AbstractEmbeddedDocumentBytesHandler
getEmitKey, getIds
-
-
-
-
Constructor Detail
-
BasicEmbeddedDocumentBytesHandler
public BasicEmbeddedDocumentBytesHandler(EmbeddedDocumentBytesConfig config)
-
-
Method Detail
-
add
public void add(int id, Metadata metadata, InputStream is) throws IOException
- Specified by:
add
in interfaceEmbeddedDocumentBytesHandler
- Overrides:
add
in classAbstractEmbeddedDocumentBytesHandler
- Throws:
IOException
-
getDocument
public InputStream getDocument(int id) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException
- Throws:
IOException
-
-