public final class TextExtractorContext extends Object implements TextExtractor.Context
Constructor and Description |
---|
TextExtractorContext(MimeTypeDetector detector) |
Modifier and Type | Method and Description |
---|---|
String |
mimeTypeOf(String name,
Binary binaryValue)
Determines the mime-type of the given binary value .
|
public TextExtractorContext(MimeTypeDetector detector)
public String mimeTypeOf(String name, Binary binaryValue) throws RepositoryException, IOException
TextExtractor.Context
mimeTypeOf
in interface TextExtractor.Context
name
- a symbolic name of the binary value (e.g. the name of a file); may be null
binaryValue
- a Binary
instance which represents the binary data; may not be null
null
if it's not possible to determine the mimetype.RepositoryException
- if there are any problems accessing the binary value from the repository.IOException
- if there are any problems reading bytes from the binary value.Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.