| Package | Description |
|---|---|
| com.stormpath.sdk.impl.http | |
| com.stormpath.sdk.impl.http.support |
| Modifier and Type | Field and Description |
|---|---|
static MediaType |
MediaType.ALL
Public constant media type that includes all media ranges (i.e.
|
static MediaType |
MediaType.APPLICATION_ATOM_XML
Public constant media type for
application/atom+xml. |
static MediaType |
MediaType.APPLICATION_FORM_URLENCODED
Public constant media type for
application/x-www-form-urlencoded. |
static MediaType |
MediaType.APPLICATION_JSON
Public constant media type for
application/json. |
static MediaType |
MediaType.APPLICATION_OCTET_STREAM
Public constant media type for
application/octet-stream. |
static MediaType |
MediaType.APPLICATION_XHTML_XML
Public constant media type for
application/xhtml+xml. |
static MediaType |
MediaType.APPLICATION_XML
Public constant media type for
application/xml. |
static MediaType |
MediaType.IMAGE_GIF
Public constant media type for
image/gif. |
static MediaType |
MediaType.IMAGE_JPEG
Public constant media type for
image/jpeg. |
static MediaType |
MediaType.IMAGE_PNG
Public constant media type for
image/png. |
static MediaType |
MediaType.MULTIPART_FORM_DATA
Public constant media type for
multipart/form-data. |
static MediaType |
MediaType.TEXT_HTML
Public constant media type for
text/html. |
static MediaType |
MediaType.TEXT_PLAIN
Public constant media type for
text/plain. |
static MediaType |
MediaType.TEXT_XML
Public constant media type for
text/xml. |
| Modifier and Type | Field and Description |
|---|---|
static Comparator<MediaType> |
MediaType.QUALITY_VALUE_COMPARATOR
Comparator used by
sortByQualityValue(List). |
static Comparator<MediaType> |
MediaType.SPECIFICITY_COMPARATOR
Comparator used by
sortBySpecificity(List). |
| Modifier and Type | Method and Description |
|---|---|
MediaType |
HttpHeaders.getContentType()
Return the media type of the body, as specified by the
Content-Type header. |
static MediaType |
MediaType.parseMediaType(String mediaType)
Parse the given String into a single
MediaType. |
static MediaType |
MediaType.valueOf(String value)
Parse the given String value into a
MediaType object,
with this method name following the 'valueOf' naming convention |
| Modifier and Type | Method and Description |
|---|---|
List<MediaType> |
HttpHeaders.getAccept()
Return the list of acceptable media types, as specified by the
Accept header. |
static List<MediaType> |
MediaType.parseMediaTypes(String mediaTypes)
Parse the given, comma-separated string into a list of
MediaType objects. |
| Modifier and Type | Method and Description |
|---|---|
int |
MediaType.compareTo(MediaType other)
Compares this
MediaType to another alphabetically. |
boolean |
MediaType.includes(MediaType other)
Indicate whether this
MediaType includes the given media type. |
boolean |
MediaType.isCompatibleWith(MediaType other)
Indicate whether this
MediaType is compatible with the given media type. |
void |
HttpHeaders.setContentType(MediaType mediaType)
Set the media type of the body, as specified by the
Content-Type header. |
| Modifier and Type | Method and Description |
|---|---|
void |
HttpHeaders.setAccept(List<MediaType> acceptableMediaTypes)
Set the list of acceptable media types, as specified by the
Accept header. |
static void |
MediaType.sortByQualityValue(List<MediaType> mediaTypes)
Sorts the given list of
MediaType objects by quality value. |
static void |
MediaType.sortBySpecificity(List<MediaType> mediaTypes)
Sorts the given list of
MediaType objects by specificity. |
static String |
MediaType.toString(Collection<MediaType> mediaTypes)
Return a string representation of the given list of
MediaType objects. |
| Constructor and Description |
|---|
MediaType(MediaType other,
Map<String,String> parameters)
Copy-constructor that copies the type and subtype of the given
MediaType,
and allows for different parameter. |
| Constructor and Description |
|---|
DefaultResponse(int httpStatus,
MediaType contentType,
InputStream body,
long contentLength) |
Copyright © 2012–2014. All rights reserved.