object DetectMimeTypeTika
Detect MIME type using Apache Tika.
- Alphabetic
- By Inheritance
- DetectMimeTypeTika
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- val allMimeTypes: MimeTypes
-
def
apply(content: Array[Byte]): String
Detect MIME type from an input string.
Detect MIME type from an input string.
- content
a byte array of content for which to detect the MimeType
- returns
MIME type (e.g. "text/html" or "application/xml") or "N/A".
- val detector: DefaultDetector
-
def
getExtension(mimeType: String): String
Return the best guess at a file extension from a MIME type string
Return the best guess at a file extension from a MIME type string
- mimeType
string representation of the MimeType
- returns
file extension (e.g. ".jpg" for "image/jpeg").
-
def
getExtensions(mimeType: String): List[String]
Return the list of all known file extensions for a MIME type string
Return the list of all known file extensions for a MIME type string
- mimeType
string representation of the MimeType
- returns
list of file extensions (e.g. ".jpg" for "image/jpeg").
- val parser: AutoDetectParser
- val tika: Tika