Package org.somda.sdc.dpws.http
Class ContentType
java.lang.Object
org.somda.sdc.dpws.http.ContentType
Handler for parsing Content-Types accepted by SDCri.
This is currently limited to three content-types: text/xml, application/xml and application/soap+xml.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresentation of all accepted content-types as well as their default charset, if it is given. -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<ContentType>fromApache(org.apache.http.Header header) Parses the content-type Header element provided by apache http client.static Optional<ContentType>fromListMultimap(com.google.common.collect.ListMultimap<String, String> headers) Parses the content-type entry from aListMultimapcontaining header entries.toString()
-
Method Details
-
fromListMultimap
public static Optional<ContentType> fromListMultimap(com.google.common.collect.ListMultimap<String, String> headers) Parses the content-type entry from aListMultimapcontaining header entries. Http header keys must be lower case, i.e. content-type, not Content-Type/- Parameters:
headers- to parse content-type from- Returns:
- parsed content-type if successful, empty optional otherwise
-
fromApache
Parses the content-type Header element provided by apache http client.- Parameters:
header- to parse content-type from- Returns:
- parsed content-type if parseable, empty optional otherweise
-
getCharset
-
getContentType
-
getBoundary
-
toString
-