public class ContentInfo extends Object implements Serializable
ContentInfoUtil.findMatch(String)
and other methods.Modifier and Type | Field and Description |
---|---|
static ContentInfo |
EMPTY_INFO |
Constructor and Description |
---|
ContentInfo(ContentType contentType) |
ContentInfo(String name,
String mimeType,
String message,
boolean partial) |
Modifier and Type | Method and Description |
---|---|
ContentType |
getContentType()
Returns the internal enumerated type associated with the content or
ContentType.OTHER if not known. |
String[] |
getFileExtensions()
Returns an array of associated file-extensions or null if none.
|
String |
getMessage()
Returns the full message as generated by the magic matching code or null if none.
|
String |
getMimeType()
Returns the mime-type or null if none.
|
String |
getName()
Returns the short name of the content either from the content-type or extracted from the message.
|
boolean |
isPartial()
Whether or not this was a partial match.
|
String |
toString() |
public static final ContentInfo EMPTY_INFO
public ContentInfo(ContentType contentType)
public ContentType getContentType()
ContentType.OTHER
if not known.public String getName()
public String getMimeType()
public String getMessage()
public String[] getFileExtensions()
public boolean isPartial()
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.