public interface MimeTypeDetector
Modifier and Type | Method and Description |
---|---|
String |
mimeTypeOf(String name,
Binary binaryValue)
Returns the MIME-type of a binary value, using its supplied content and/or its supplied name, depending upon the
implementation.
|
String mimeTypeOf(String name, Binary binaryValue) throws RepositoryException, IOException
null
may be returned,
where the former will prevent earlier registered MIME-type detectors from being consulted.name
- The name of the data source; may be null
.binaryValue
- The value which contains the raw data for which the mime type should be returned; may be
null
.null
if the MIME-type could not be determined.IOException
- If an error occurs reading the supplied content.RepositoryException
- if any error occurs while attempting to read the stream from the binary valueCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.