Java com.google.common.net MediaType fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.net MediaType fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.net MediaType.

The text is from its open source code.

Field

MediaTypeANY_TYPE
MediaTypeANY_TEXT_TYPE
MediaTypeANY_IMAGE_TYPE
MediaTypeANY_AUDIO_TYPE
MediaTypeANY_VIDEO_TYPE
MediaTypeANY_APPLICATION_TYPE
MediaTypeCSS_UTF_8
MediaTypeCSV_UTF_8
MediaTypeHTML_UTF_8
MediaTypePLAIN_TEXT_UTF_8
MediaTypeTSV_UTF_8
Tab separated values.
MediaTypeXML_UTF_8
As described in RFC 3023, this constant ( text/xml ) is used for XML documents that are "readable by casual users."
MediaTypeGIF
MediaTypeJPEG
MediaTypePNG
MediaTypeSVG_UTF_8
MediaTypeAPPLICATION_XML_UTF_8
As described in RFC 3023, this constant ( application/xml ) is used for XML documents that are "unreadable by casual users."
MediaTypeEPUB
As described in the International Digital Publishing Forum EPUB is the distribution and interchange format standard for digital publications and documents.
MediaTypeFORM_DATA
MediaTypeAPPLICATION_BINARY
This is a non-standard media type, but is commonly used in serving hosted binary files as it is known not to trigger content sniffing in current browsers.
MediaTypeJAVASCRIPT_UTF_8
RFC 4329 declares this to be the correct media type for JavaScript, but #TEXT_JAVASCRIPT_UTF_8 text/javascript may be necessary in certain situations for compatibility.
MediaTypeJSON_UTF_8
MediaTypeMICROSOFT_EXCEL
MediaTypeMICROSOFT_POWERPOINT
MediaTypeMICROSOFT_WORD
MediaTypeOCTET_STREAM
MediaTypeOOXML_DOCUMENT
MediaTypePDF
MediaTypeTAR
MediaTypeXHTML_UTF_8
MediaTypeZIP
Stringtype
Stringsubtype
ImmutableListMultimapparameters
StringtoString

Method

Optionalcharset()
Returns an optional charset for the value of the charset parameter if it is specified.
MediaTypecreate(String type, String subtype)
Creates a new media type with the given type and subtype.
booleanhasWildcard()
Returns true if either the type or subtype is the wildcard.
booleanis(MediaType mediaTypeRange)
Returns true if this instance falls within the range (as defined by the HTTP Accept header) given by the argument according to three criteria:
  1. The type of the argument is the wildcard or equal to the type of this instance.
MediaTypeparse(String input)
Parses a media type from its string representation.
MediaTypewithCharset(Charset charset)
Returns a new instance with the same type and subtype as this instance, with the charset parameter set to the Charset#name name of the given charset.
MediaTypewithoutParameters()
Returns a new instance with the same type and subtype as this instance, but without any parameters.
MediaTypewithParameter(String attribute, String value)
Replaces all parameters with the given attribute with a single parameter with the given value.