|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContainerDetector
A detector that knows about the container formats that we support
(eg POIFS, Zip), and is able to peek inside them to better figure
out the contents.
Delegates to another Detector
(normally MimeTypes
)
to handle detection for non container formats.
Should normally be used with a TikaInputStream
to minimise
the memory usage.
Method Summary | |
---|---|
MediaType |
detect(java.io.InputStream input,
Metadata metadata)
Detect on the generic input stream, if possible. |
MediaType |
detect(TikaInputStream input,
Metadata metadata)
Does full, container aware detection for the file of the appropriate container type. |
MediaType |
getDefault()
What is the default type returned by this detector, when it can't figure out anything more specific? |
Method Detail |
---|
MediaType getDefault()
MediaType detect(java.io.InputStream input, Metadata metadata) throws java.io.IOException
TikaInputStream
is needed for proper detection.
detect
in interface Detector
input
- document input stream, or null
metadata
- input metadata for the document
application/octet-stream
java.io.IOException
- if the document input stream could not be readMediaType detect(TikaInputStream input, Metadata metadata) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |