| Package | Description |
|---|---|
| org.osgl.util |
| Modifier and Type | Method and Description |
|---|---|
MimeType |
MimeType.createAlias(String name)
Create an new MimeType with traits and type of this MimeType instance and associate it with an new name.
|
static MimeType |
MimeType.findByContentType(String contentType)
Find MimeType by content type.
|
static MimeType |
MimeType.findByFileExtension(String fileExtension)
Deprecated.
|
static MimeType |
MimeType.findByName(String name)
Return a MimeType by name.
|
| Modifier and Type | Method and Description |
|---|---|
static Collection<MimeType> |
MimeType.allMimeTypes()
Returns a collection of all managed mime types.
|
static List<MimeType> |
MimeType.filterByTrait(MimeType.Trait trait)
Get a list of
MimeType with each item contains the trait specified. |
| Modifier and Type | Method and Description |
|---|---|
STAGE |
IO.ReadStageBase.contentType(MimeType type) |
boolean |
MimeType.isAlias(MimeType mimeType)
Check if the mime type specified is an alias of this mime type.
|
boolean |
MimeType.isSameTypeWith(MimeType mimeType)
Check if the mime type specified has the same
type of this mime type. |
boolean |
MimeType.isSameTypeWithAny(MimeType... types)
Check if this mime type is same type of any one specified in the var arg list.
|
<T> T |
IO.InputStreamHandler.read(InputStream is,
Type targetType,
MimeType mimeType,
Object hint)
Read an
InputStream and construct an instance of type. |
static void |
IO.registerInputStreamHandler(MimeType type,
IO.InputStreamHandler handler)
Associate an
IO.InputStreamHandler with a specific MimeType |
boolean |
MimeType.Trait.test(MimeType mimeType) |
Copyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.