Package eu.medsea.mimeutil
Class TextMimeType
java.lang.Object
eu.medsea.mimeutil.MimeType
eu.medsea.mimeutil.TextMimeType
- All Implemented Interfaces:
Serializable
,Comparable
This class can be used to represent a mime type for a text file.
This should only be returned by MimeDetector(s) that use magic number
type matching. It allows for an encoding to be associated to a text type
mime type such as text/plain.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTextMimeType
(MimeType mimeType) TextMimeType
(MimeType mimeType, String encoding) TextMimeType
(String mimeType, String encoding) Construct a TextMimeType from a string representation of a MimeType and an encoding that should be one of the known encodings. -
Method Summary
Modifier and TypeMethodDescriptionGet the encoding currently set for this TextMimeType.void
setEncoding
(String encoding) void
setMediaType
(String mediaType) void
setMimeType
(MimeType mimeType) void
setSubType
(String subType) toString()
Overrides the toString method ofjava.lang.Object
.Methods inherited from class eu.medsea.mimeutil.MimeType
compareTo, equals, getMediaType, getSpecificity, getSubType, hashCode
-
Constructor Details
-
TextMimeType
Construct a TextMimeType from a string representation of a MimeType and an encoding that should be one of the known encodings.- Parameters:
mimeType
-encoding
-- See Also:
-
TextMimeType
-
TextMimeType
-
-
Method Details
-
setMimeType
-
getEncoding
Get the encoding currently set for this TextMimeType.- Returns:
- the encoding as a string
- See Also:
-
setEncoding
-
toString
Description copied from class:MimeType
Overrides the toString method ofjava.lang.Object
. -
setMediaType
-
setSubType
-