| Package | Description |
|---|---|
| com.helger.commons.mime | |
| com.helger.commons.url |
| Modifier and Type | Class and Description |
|---|---|
class |
MimeType
Represents a single MIME type as the combination of the content type and the
sub-type and parameters.
|
| Modifier and Type | Field and Description |
|---|---|
static IMimeType |
CMimeType.APPLICATION_ATOM_XML
Atom XML feed.
|
static IMimeType |
CMimeType.APPLICATION_FORCE_DOWNLOAD
Downloadable document.
|
static IMimeType |
CMimeType.APPLICATION_JAVA_APPLET
Java applet
|
static IMimeType |
CMimeType.APPLICATION_JSON
JSON document.
|
static IMimeType |
CMimeType.APPLICATION_MS_EXCEL
Excel document.
|
static IMimeType |
CMimeType.APPLICATION_MS_EXCEL_2007
Excel 2007 document
|
static IMimeType |
CMimeType.APPLICATION_MS_POWERPOINT
PowerPoint document.
|
static IMimeType |
CMimeType.APPLICATION_MS_POWERPOINT_2007
PowerPoint 2007 document.
|
static IMimeType |
CMimeType.APPLICATION_MS_WORD
Word document.
|
static IMimeType |
CMimeType.APPLICATION_MS_WORD_2007
Word 2007 document
|
static IMimeType |
CMimeType.APPLICATION_OCTET_STREAM
Any byte stream.
|
static IMimeType |
CMimeType.APPLICATION_PDF
PDF document.
|
static IMimeType |
CMimeType.APPLICATION_RSS_XML
RSS XML feed.
|
static IMimeType |
CMimeType.APPLICATION_SHOCKWAVE_FLASH
Shockwave/Flash
|
static IMimeType |
CMimeType.APPLICATION_X_WWW_FORM_URLENCODED
For URL posting.
|
static IMimeType |
CMimeType.APPLICATION_XML
XML document.
|
static IMimeType |
CMimeType.APPLICATION_ZIP
ZIP document.
|
static IMimeType |
CMimeType.AUDIO_MP3
For MP3 files
|
static IMimeType |
MimeTypeDeterminator.DEFAULT_MIME_TYPE |
static IMimeType |
CMimeType.IMAGE_BMP
Bitmap image.
|
static IMimeType |
CMimeType.IMAGE_GIF
GIF image.
|
static IMimeType |
CMimeType.IMAGE_ICON
Icon image.
|
static IMimeType |
CMimeType.IMAGE_JPG
JPEG image.
|
static IMimeType |
CMimeType.IMAGE_PNG
PNG image.
|
static IMimeType |
CMimeType.IMAGE_PSD
Photoshop image.
|
static IMimeType |
CMimeType.IMAGE_TIFF
TIFF image.
|
static IMimeType |
CMimeType.IMAGE_WEBP
WebP image.
|
static IMimeType |
CMimeType.IMAGE_X_ICON
Icon image.
|
static IMimeType |
CMimeType.MULTIPART_FORMDATA
For HTML upload forms.
|
static IMimeType |
CMimeType.TEXT_CONTENT_SECURITY_POLICY
Mozilla CSP
|
static IMimeType |
CMimeType.TEXT_CSS
CSS style-sheet document.
|
static IMimeType |
CMimeType.TEXT_CSV
CSV document.
|
static IMimeType |
CMimeType.TEXT_HTML
HTML document.
|
static IMimeType |
CMimeType.TEXT_HTML_SANDBOXED
HTML5 sandboxed document.
|
static IMimeType |
CMimeType.TEXT_JAVASCRIPT
JavaScript document.
|
static IMimeType |
CMimeType.TEXT_PLAIN
Plain text document.
|
static IMimeType |
CMimeType.TEXT_XML
XML document.
|
| Modifier and Type | Method and Description |
|---|---|
IMimeType |
IMimeType.getCopyWithoutParameters() |
IMimeType |
MimeTypeInfo.MimeTypeWithSource.getMimeType() |
IMimeType |
MimeTypeContent.getMimeType() |
IMimeType |
MimeTypeDeterminator.getMimeTypeFromBytes(byte[] b)
Try to determine the MIME type from the given byte array.
|
IMimeType |
MimeTypeDeterminator.getMimeTypeFromBytes(byte[] b,
IMimeType aDefault)
Try to determine the MIME type from the given byte array.
|
IMimeType |
MimeTypeDeterminator.getMimeTypeFromString(String s,
Charset aCharset)
Try to find the MIME type that matches the passed content string.
|
IMimeType |
MimeTypeDeterminator.getMimeTypeFromString(String s,
Charset aCharset,
IMimeType aDefault)
Try to find the MIME type that matches the passed content string.
|
IMimeType |
MimeTypeInfo.getPrimaryMimeType() |
IMimeType |
MimeTypeInfoManager.getPrimaryMimeTypeForExtension(String sExtension)
Get the primary (=first) mime type that is associated to the specified
filename extension.
|
IMimeType |
MimeTypeInfoManager.getPrimaryMimeTypeForFilename(String sFilename)
Get the primary (=first) mime type associated with the specified filename.
|
| Modifier and Type | Method and Description |
|---|---|
ICommonsOrderedSet<IMimeType> |
MimeTypeInfoManager.getAllMimeTypes() |
ICommonsSet<IMimeType> |
MimeTypeInfo.getAllMimeTypes() |
ICommonsOrderedSet<IMimeType> |
MimeTypeInfoManager.getAllMimeTypesForExtension(String sExtension)
Get all mime types that are associated to the specified filename extension.
|
ICommonsSet<IMimeType> |
MimeTypeInfoManager.getAllMimeTypesForFilename(String sFilename)
Get all mime types that are associated to the extension of the specified
filename.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
MimeTypeInfo.containsMimeType(IMimeType aMimeType) |
ICommonsOrderedSet<String> |
MimeTypeInfoManager.getAllExtensionsOfMimeType(IMimeType aMimeType)
Get all extensions associated to the specified mime type
|
ICommonsOrderedSet<String> |
MimeTypeInfoManager.getAllGlobsOfMimeType(IMimeType aMimeType)
Get all globs (=filename patterns) associated to the specified mime type
|
ICommonsList<MimeTypeInfo> |
MimeTypeInfoManager.getAllInfosOfMimeType(IMimeType aMimeType)
Get all infos associated with the passed mime type.
|
static Charset |
MimeTypeHelper.getCharsetFromMimeType(IMimeType aMimeType)
Determine the charset from the provided MIME type.
|
static String |
MimeTypeHelper.getCharsetNameFromMimeType(IMimeType aMimeType)
Determine the charset name from the provided MIME type.
|
IMimeType |
MimeTypeDeterminator.getMimeTypeFromBytes(byte[] b,
IMimeType aDefault)
Try to determine the MIME type from the given byte array.
|
IMimeType |
MimeTypeDeterminator.getMimeTypeFromString(String s,
Charset aCharset,
IMimeType aDefault)
Try to find the MIME type that matches the passed content string.
|
String |
MimeTypeInfoManager.getPrimaryExtensionOfMimeType(IMimeType aMimeType)
Get the primary (=first) extension for the specified mime type.
|
| Constructor and Description |
|---|
MimeType(IMimeType aOther)
Kind of a copy constructor
|
MimeTypeContent(byte[] aContentBytes,
IMimeType aMimeType)
Constructor
|
MimeTypeWithSource(IMimeType aMimeType) |
MimeTypeWithSource(IMimeType aMimeType,
String sSource) |
| Modifier and Type | Method and Description |
|---|---|
static InputStream |
URLHelper.postAndGetInputStream(URL aURL,
int nConnectTimeoutMS,
int nReadTimeoutMS,
IMimeType aContentType,
byte[] aContentBytes,
Map<String,String> aAdditionalHTTPHeaders,
Consumer<URLConnection> aConnectionModifier,
IMutableWrapper<IOException> aExceptionHolder)
Deprecated.
Use Apache http client or the like for a much better handling
|
Copyright © 2014–2016 Philip Helger. All rights reserved.