Uses of Class
com.google.common.net.MediaType
Packages that use MediaType
Package
Description
Utility methods and classes for networking (such as IP addresses and domain names).
-
Uses of MediaType in com.google.common.net
Fields in com.google.common.net declared as MediaTypeModifier and TypeFieldDescriptionstatic final MediaType
MediaType.AAC_AUDIO
Advanced Audio Coding.static final MediaType
MediaType.ANY_APPLICATION_TYPE
static final MediaType
MediaType.ANY_AUDIO_TYPE
static final MediaType
MediaType.ANY_FONT_TYPE
Wildcard matching any "font" top-level media type.static final MediaType
MediaType.ANY_IMAGE_TYPE
static final MediaType
MediaType.ANY_TEXT_TYPE
static final MediaType
MediaType.ANY_TYPE
static final MediaType
MediaType.ANY_VIDEO_TYPE
static final MediaType
MediaType.APPLE_MOBILE_CONFIG
static final MediaType
MediaType.APPLE_PASSBOOK
static final MediaType
MediaType.APPLICATION_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.static final MediaType
MediaType.APPLICATION_XML_UTF_8
As described in RFC 3023, this constant (application/xml
) is used for XML documents that are "unreadable by casual users."static final MediaType
MediaType.ATOM_UTF_8
static final MediaType
MediaType.AVIF
static final MediaType
MediaType.BASIC_AUDIO
Basic Audio, as defined by RFC 2046.static final MediaType
MediaType.BMP
Bitmap file format (bmp
files).static final MediaType
MediaType.BZIP2
static final MediaType
MediaType.CACHE_MANIFEST_UTF_8
static final MediaType
MediaType.CBOR
As described in RFC 8949, this constant (application/cbor
) is used for the Concise Binary Object Representation (CBOR) data format.static final MediaType
MediaType.CRW
The Canon Image File Format (crw
files), a widely-used "raw image" format for cameras.static final MediaType
MediaType.CSS_UTF_8
static final MediaType
MediaType.CSV_UTF_8
static final MediaType
MediaType.DART_UTF_8
Files in the dart programming language.static final MediaType
MediaType.EOT
Embedded OpenType fonts.static final MediaType
MediaType.EPUB
As described in the International Digital Publishing Forum EPUB is the distribution and interchange format standard for digital publications and documents.static final MediaType
MediaType.FLV_VIDEO
Flash video.static final MediaType
MediaType.FONT_COLLECTION
A collection of font outlines as defined by RFC 8081.static final MediaType
MediaType.FONT_OTF
Open Type Font Format (OTF) as defined by RFC 8081.static final MediaType
MediaType.FONT_SFNT
Spline or Scalable Font Format (SFNT).static final MediaType
MediaType.FONT_TTF
True Type Font Format (TTF) as defined by RFC 8081.static final MediaType
MediaType.FONT_WOFF
Web Open Font Format (WOFF).static final MediaType
MediaType.FONT_WOFF2
Web Open Font Format (WOFF2).static final MediaType
MediaType.FORM_DATA
static final MediaType
MediaType.GEO_JSON
Media type for the GeoJSON Format, a geospatial data interchange format based on JSON.static final MediaType
MediaType.GIF
static final MediaType
MediaType.GZIP
static final MediaType
MediaType.HAL_JSON
static final MediaType
MediaType.HEIF
static final MediaType
MediaType.HTML_UTF_8
static final MediaType
MediaType.I_CALENDAR_UTF_8
static final MediaType
MediaType.ICO
static final MediaType
MediaType.JAVASCRIPT_UTF_8
RFC 4329 declares this to be the correct media type for JavaScript, buttext/javascript
may be necessary in certain situations for compatibility.static final MediaType
MediaType.JOSE
static final MediaType
MediaType.JOSE_JSON
static final MediaType
MediaType.JP2K
static final MediaType
MediaType.JPEG
static final MediaType
MediaType.JSON_UTF_8
static final MediaType
MediaType.JWT
static final MediaType
MediaType.KEY_ARCHIVE
As described in PKCS #12: Personal Information Exchange Syntax Standard, PKCS #12 defines an archive file format for storing many cryptography objects as a single file.static final MediaType
MediaType.KML
static final MediaType
MediaType.KMZ
OGC KML (Keyhole Markup Language), compressed using the ZIP format into KMZ archives.static final MediaType
MediaType.L16_AUDIO
L16 audio, as defined by RFC 2586.static final MediaType
MediaType.L24_AUDIO
L24 audio, as defined by RFC 3190.static final MediaType
MediaType.MANIFEST_JSON_UTF_8
static final MediaType
MediaType.MBOX
The mbox database format.static final MediaType
MediaType.MD_UTF_8
As described in RFC 7763, this constant (text/markdown
) is used for Markdown documents.static final MediaType
MediaType.MEDIA_PRESENTATION_DESCRIPTION
Media type for Dynamic Adaptive Streaming over HTTP (DASH).static final MediaType
MediaType.MICROSOFT_EXCEL
Microsoft Excel spreadsheets.static final MediaType
MediaType.MICROSOFT_OUTLOOK
Microsoft Outlook items.static final MediaType
MediaType.MICROSOFT_POWERPOINT
Microsoft Powerpoint presentations.static final MediaType
MediaType.MICROSOFT_WORD
Microsoft Word documents.static final MediaType
MediaType.MP4_AUDIO
static final MediaType
MediaType.MP4_VIDEO
static final MediaType
MediaType.MPEG_AUDIO
static final MediaType
MediaType.MPEG_VIDEO
static final MediaType
MediaType.NACL_APPLICATION
NaCl applications.static final MediaType
MediaType.NACL_PORTABLE_APPLICATION
NaCl portable applications.static final MediaType
MediaType.OCTET_STREAM
static final MediaType
MediaType.OGG_AUDIO
static final MediaType
MediaType.OGG_CONTAINER
static final MediaType
MediaType.OGG_VIDEO
static final MediaType
MediaType.OOXML_DOCUMENT
static final MediaType
MediaType.OOXML_PRESENTATION
static final MediaType
MediaType.OOXML_SHEET
static final MediaType
MediaType.OPENDOCUMENT_GRAPHICS
static final MediaType
MediaType.OPENDOCUMENT_PRESENTATION
static final MediaType
MediaType.OPENDOCUMENT_SPREADSHEET
static final MediaType
MediaType.OPENDOCUMENT_TEXT
static final MediaType
MediaType.OPENSEARCH_DESCRIPTION_UTF_8
OpenSearch Description files are XML files that describe how a website can be used as a search engine by consumers (e.g. web browsers).static final MediaType
MediaType.PDF
static final MediaType
MediaType.PLAIN_TEXT_UTF_8
static final MediaType
MediaType.PNG
static final MediaType
MediaType.POSTSCRIPT
static final MediaType
MediaType.PROTOBUF
static final MediaType
MediaType.PSD
static final MediaType
MediaType.QUICKTIME
static final MediaType
MediaType.RDF_XML_UTF_8
RDF/XML documents, which are XML serializations of Resource Description Framework graphs.static final MediaType
MediaType.RTF_UTF_8
static final MediaType
MediaType.SFNT
static final MediaType
MediaType.SHOCKWAVE_FLASH
static final MediaType
MediaType.SKETCHUP
skp
files produced by the 3D Modeling software SketchUpstatic final MediaType
MediaType.SOAP_XML_UTF_8
As described in RFC 3902, this constant (application/soap+xml
) is used to identify SOAP 1.2 message envelopes that have been serialized with XML 1.0.static final MediaType
MediaType.SVG_UTF_8
static final MediaType
MediaType.TAR
static final MediaType
MediaType.TEXT_JAVASCRIPT_UTF_8
RFC 4329 declaresapplication/javascript
to be the correct media type for JavaScript, but this may be necessary in certain situations for compatibility.static final MediaType
MediaType.THREE_GPP_VIDEO
The 3GP multimedia container format.static final MediaType
MediaType.THREE_GPP2_VIDEO
The 3G2 multimedia container format.static final MediaType
MediaType.TIFF
static final MediaType
MediaType.TSV_UTF_8
static final MediaType
MediaType.VCARD_UTF_8
static final MediaType
MediaType.VND_REAL_AUDIO
Real Audio.static final MediaType
MediaType.VND_WAVE_AUDIO
WAVE format, as defined by RFC 2361.static final MediaType
MediaType.VORBIS_AUDIO
Vorbis Audio, as defined by RFC 5215.static final MediaType
MediaType.VTT_UTF_8
As described in the VTT spec, this is used for Web Video Text Tracks (WebVTT) files, used with the HTML5 track element.static final MediaType
MediaType.WASM_APPLICATION
WASM applications.static final MediaType
MediaType.WAX_AUDIO
Windows Media metafiles.static final MediaType
MediaType.WEBM_AUDIO
static final MediaType
MediaType.WEBM_VIDEO
static final MediaType
MediaType.WEBP
static final MediaType
MediaType.WMA_AUDIO
Windows Media Audio.static final MediaType
MediaType.WML_UTF_8
UTF-8 encoded Wireless Markup Language.static final MediaType
MediaType.WMV
static final MediaType
MediaType.WOFF
static final MediaType
MediaType.WOFF2
RFC 8081 declaresfont/woff2
to be the correct media type for WOFF2, but this may be necessary in certain situations for compatibility.static final MediaType
MediaType.XHTML_UTF_8
static final MediaType
MediaType.XML_UTF_8
As described in RFC 3023, this constant (text/xml
) is used for XML documents that are "readable by casual users."static final MediaType
MediaType.XRD_UTF_8
Extensible Resource Descriptors.static final MediaType
MediaType.ZIP
Methods in com.google.common.net that return MediaTypeModifier and TypeMethodDescriptionstatic MediaType
Creates a new media type with the given type and subtype.static MediaType
Parses a media type from its string representation.MediaType.withCharset
(Charset charset) Returns a new instance with the same type and subtype as this instance, with thecharset
parameter set to thename
of the given charset.MediaType.withoutParameters()
Returns a new instance with the same type and subtype as this instance, but without any parameters.MediaType.withParameter
(String attribute, String value) Replaces all parameters with the given attribute with a single parameter with the given value.MediaType.withParameters
(Multimap<String, String> parameters) Replaces all parameters with the given parameters.MediaType.withParameters
(String attribute, Iterable<String> values) Replaces all parameters with the given attribute with parameters using the given values.Methods in com.google.common.net with parameters of type MediaTypeModifier and TypeMethodDescriptionboolean
Returnstrue
if this instance falls within the range (as defined by the HTTP Accept header) given by the argument according to three criteria: The type of the argument is the wildcard or equal to the type of this instance.