Package org.somda.sdc.dpws.http
Enum ContentType.ContentTypes
-
- All Implemented Interfaces:
public enum ContentType.ContentTypesRepresentation of all accepted content-types as well as their default charset, if it is given.
-
-
Field Summary
Fields Modifier and Type Field Description public final StringcontentTypepublic final CharsetdefaultEncoding
-
Enum Constant Summary
Enum Constants Enum Constant Description TEXT_XMLAPPLICATION_XMLAPPLICATION_SOAP_XML
-
Method Summary
Modifier and Type Method Description static Optional<ContentType.ContentTypes>fromMime(String mime)Maps a mime-type to the respective ContentTypes enum value. static Array<ContentType.ContentTypes>values()Returns an array containing the constants of this enum type, in the order they're declared. static ContentType.ContentTypesvalueOf(String name)Returns the enum constant of this type with the specified name. StringgetContentType()CharsetgetDefaultEncoding()-
-
Method Detail
-
fromMime
static Optional<ContentType.ContentTypes> fromMime(String mime)
Maps a mime-type to the respective ContentTypes enum value.
- Parameters:
mime- to map to content types value- Returns:
enum value if present, empty Optional otherwise
-
values
static Array<ContentType.ContentTypes> values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.
- Returns:
an array containing the constants of this enum type, in the order they're declared
-
valueOf
static ContentType.ContentTypes valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
- Returns:
the enum constant with the specified name
-
getContentType
String getContentType()
-
getDefaultEncoding
Charset getDefaultEncoding()
-
-
-
-