Application octet stream java

Содержание
  1. Application octet stream java
  2. Field Summary
  3. Constructor Summary
  4. Method Summary
  5. Methods inherited from class java.lang.Object
  6. Field Detail
  7. ALL
  8. ALL_VALUE
  9. APPLICATION_ATOM_XML
  10. APPLICATION_ATOM_XML_VALUE
  11. APPLICATION_RSS_XML
  12. APPLICATION_RSS_XML_VALUE
  13. APPLICATION_FORM_URLENCODED
  14. APPLICATION_FORM_URLENCODED_VALUE
  15. APPLICATION_JSON
  16. APPLICATION_JSON_VALUE
  17. APPLICATION_OCTET_STREAM
  18. APPLICATION_OCTET_STREAM_VALUE
  19. APPLICATION_XHTML_XML
  20. APPLICATION_XHTML_XML_VALUE
  21. APPLICATION_XML
  22. APPLICATION_XML_VALUE
  23. APPLICATION_WILDCARD_XML
  24. APPLICATION_WILDCARD_XML_VALUE
  25. IMAGE_GIF
  26. IMAGE_GIF_VALUE
  27. IMAGE_JPEG
  28. IMAGE_JPEG_VALUE
  29. IMAGE_PNG
  30. IMAGE_PNG_VALUE
  31. MULTIPART_FORM_DATA
  32. MULTIPART_FORM_DATA_VALUE
  33. TEXT_HTML
  34. TEXT_HTML_VALUE
  35. TEXT_PLAIN
  36. TEXT_PLAIN_VALUE
  37. TEXT_XML
  38. TEXT_XML_VALUE
  39. SPECIFICITY_COMPARATOR
  40. QUALITY_VALUE_COMPARATOR
  41. Constructor Detail
  42. MediaType
  43. MediaType
  44. MediaType
  45. MediaType
  46. MediaType
  47. MediaType
  48. Method Detail
  49. getType
  50. isWildcardType
  51. getSubtype
  52. isWildcardSubtype
  53. isConcrete
  54. getCharSet
  55. getQualityValue
  56. getParameter
  57. getParameters
  58. includes
  59. isCompatibleWith
  60. copyQualityValue
  61. removeQualityValue
  62. compareTo
  63. equals
  64. hashCode
  65. toString
  66. valueOf
  67. parseMediaType
  68. parseMediaTypes
  69. toString
  70. sortBySpecificity
  71. sortByQualityValue
  72. sortBySpecificityAndQuality
  73. Application octet stream java
  74. Methods inherited from class java.lang.Object
  75. Field Detail
  76. CHARSET_PARAMETER
  77. MEDIA_TYPE_WILDCARD
  78. WILDCARD
  79. WILDCARD_TYPE
  80. APPLICATION_XML
  81. APPLICATION_XML_TYPE
  82. APPLICATION_ATOM_XML
  83. APPLICATION_ATOM_XML_TYPE
  84. APPLICATION_XHTML_XML
  85. APPLICATION_XHTML_XML_TYPE
  86. APPLICATION_SVG_XML
  87. APPLICATION_SVG_XML_TYPE
  88. APPLICATION_JSON
  89. APPLICATION_JSON_TYPE
  90. APPLICATION_FORM_URLENCODED
  91. APPLICATION_FORM_URLENCODED_TYPE
  92. MULTIPART_FORM_DATA
  93. MULTIPART_FORM_DATA_TYPE
  94. APPLICATION_OCTET_STREAM
  95. APPLICATION_OCTET_STREAM_TYPE
  96. TEXT_PLAIN
  97. TEXT_PLAIN_TYPE
  98. TEXT_XML
  99. TEXT_XML_TYPE
  100. TEXT_HTML
  101. TEXT_HTML_TYPE
  102. Constructor Detail
  103. MediaType
  104. MediaType
  105. MediaType
  106. MediaType
  107. Method Detail
  108. valueOf
  109. getType
  110. isWildcardType
  111. getSubtype
  112. isWildcardSubtype
  113. getParameters
  114. withCharset
  115. isCompatible
  116. equals
  117. hashCode
  118. toString

Application octet stream java

Represents an Internet Media Type, as defined in the HTTP specification. Consists of a type and a subtype. Also has functionality to parse media types from a string using parseMediaType(String) , or multiple comma-separated media types using parseMediaTypes(String) .

Field Summary

Constructor Summary

Copy-constructor that copies the type and subtype of the given MediaType , and allows for different parameter.

Method Summary

Indicates whether the subtype is the wildcard character * or the wildcard character followed by a sufiix (e.g.

Sorts the given list of MediaType objects by specificity as the primary criteria and quality value the secondary.

Parse the given String value into a MediaType object, with this method name following the ‘valueOf’ naming convention (as supported by ConversionService .

Methods inherited from class java.lang.Object

Field Detail

ALL

ALL_VALUE

public static final java.lang.String ALL_VALUE

APPLICATION_ATOM_XML

APPLICATION_ATOM_XML_VALUE

public static final java.lang.String APPLICATION_ATOM_XML_VALUE

APPLICATION_RSS_XML

APPLICATION_RSS_XML_VALUE

public static final java.lang.String APPLICATION_RSS_XML_VALUE

APPLICATION_FORM_URLENCODED

public static final MediaType APPLICATION_FORM_URLENCODED

APPLICATION_FORM_URLENCODED_VALUE

public static final java.lang.String APPLICATION_FORM_URLENCODED_VALUE

APPLICATION_JSON

APPLICATION_JSON_VALUE

public static final java.lang.String APPLICATION_JSON_VALUE

APPLICATION_OCTET_STREAM

APPLICATION_OCTET_STREAM_VALUE

public static final java.lang.String APPLICATION_OCTET_STREAM_VALUE

APPLICATION_XHTML_XML

APPLICATION_XHTML_XML_VALUE

public static final java.lang.String APPLICATION_XHTML_XML_VALUE

APPLICATION_XML

APPLICATION_XML_VALUE

public static final java.lang.String APPLICATION_XML_VALUE

APPLICATION_WILDCARD_XML

APPLICATION_WILDCARD_XML_VALUE

public static final java.lang.String APPLICATION_WILDCARD_XML_VALUE

IMAGE_GIF

IMAGE_GIF_VALUE

public static final java.lang.String IMAGE_GIF_VALUE

IMAGE_JPEG

IMAGE_JPEG_VALUE

public static final java.lang.String IMAGE_JPEG_VALUE

IMAGE_PNG

IMAGE_PNG_VALUE

public static final java.lang.String IMAGE_PNG_VALUE

MULTIPART_FORM_DATA

MULTIPART_FORM_DATA_VALUE

public static final java.lang.String MULTIPART_FORM_DATA_VALUE

TEXT_HTML

TEXT_HTML_VALUE

public static final java.lang.String TEXT_HTML_VALUE

TEXT_PLAIN

TEXT_PLAIN_VALUE

public static final java.lang.String TEXT_PLAIN_VALUE

TEXT_XML

TEXT_XML_VALUE

public static final java.lang.String TEXT_XML_VALUE

SPECIFICITY_COMPARATOR

QUALITY_VALUE_COMPARATOR

Constructor Detail

MediaType

public MediaType(java.lang.String type)

MediaType

public MediaType(java.lang.String type, java.lang.String subtype)

MediaType

public MediaType(java.lang.String type, java.lang.String subtype, java.nio.charset.Charset charset)

MediaType

public MediaType(java.lang.String type, java.lang.String subtype, double qualityValue)

MediaType

public MediaType(MediaType other, java.util.Map parameters)

Copy-constructor that copies the type and subtype of the given MediaType , and allows for different parameter.

Читайте также:  Css wrapper div width

MediaType

public MediaType(java.lang.String type, java.lang.String subtype, java.util.Map parameters)

Method Detail

getType

public java.lang.String getType()

isWildcardType

public boolean isWildcardType()

getSubtype

public java.lang.String getSubtype()

isWildcardSubtype

public boolean isWildcardSubtype()

Indicates whether the subtype is the wildcard character * or the wildcard character followed by a sufiix (e.g. *+xml ), or not.

isConcrete

public boolean isConcrete()

Indicates whether this media type is concrete, i.e. whether neither the type or subtype is a wildcard character * .

getCharSet

public java.nio.charset.Charset getCharSet()

getQualityValue

public double getQualityValue()

getParameter

public java.lang.String getParameter(java.lang.String name)

getParameters

public java.util.Map getParameters()

includes

Indicate whether this MediaType includes the given media type. For instance, text/* includes text/plain and text/html , and application/*+xml includes application/soap+xml , etc. This method is not symmetric.

isCompatibleWith

Indicate whether this MediaType is compatible with the given media type. For instance, text/* is compatible with text/plain , text/html , and vice versa. In effect, this method is similar to includes(MediaType) , except that it is symmetric.

copyQualityValue

public MediaType copyQualityValue(MediaType mediaType)

removeQualityValue

compareTo

equals

public boolean equals(java.lang.Object other)

hashCode

toString

public java.lang.String toString()

valueOf

public static MediaType valueOf(java.lang.String value)

Parse the given String value into a MediaType object, with this method name following the ‘valueOf’ naming convention (as supported by ConversionService .

parseMediaType

public static MediaType parseMediaType(java.lang.String mediaType)

parseMediaTypes

public static java.util.ListMediaType> parseMediaTypes(java.lang.String mediaTypes)

Parse the given, comma-separated string into a list of MediaType objects. This method can be used to parse an Accept or Content-Type header.

toString

Return a string representation of the given list of MediaType objects. This method can be used to for an Accept or Content-Type header.

Читайте также:  Java sql column types of

sortBySpecificity

  1. if either media type has a wildcard type, then the media type without the wildcard is ordered before the other.
  2. if the two media types have different types, then they are considered equal and remain their current order.
  3. if either media type has a wildcard subtype, then the media type without the wildcard is sorted before the other.
  4. if the two media types have different subtypes, then they are considered equal and remain their current order.
  5. if the two media types have different quality value, then the media type with the highest quality value is ordered before the other.
  6. if the two media types have a different amount of parameters, then the media type with the most parameters is ordered before the other.

sortByQualityValue

  1. if the two media types have different quality value, then the media type with the highest quality value is ordered before the other.
  2. if either media type has a wildcard type, then the media type without the wildcard is ordered before the other.
  3. if the two media types have different types, then they are considered equal and remain their current order.
  4. if either media type has a wildcard subtype, then the media type without the wildcard is sorted before the other.
  5. if the two media types have different subtypes, then they are considered equal and remain their current order.
  6. if the two media types have a different amount of parameters, then the media type with the most parameters is ordered before the other.

sortBySpecificityAndQuality

Sorts the given list of MediaType objects by specificity as the primary criteria and quality value the secondary.

Источник

Application octet stream java

Compares obj to this media type to see if they are the same by comparing type, subtype and parameters.

Create a new MediaType instance with the same type, subtype and parameters copied from the original instance and the supplied «»charset»» parameter.

Читайте также:  Html tags in markdown

Methods inherited from class java.lang.Object

Field Detail

CHARSET_PARAMETER

MEDIA_TYPE_WILDCARD

WILDCARD

WILDCARD_TYPE

APPLICATION_XML

APPLICATION_XML_TYPE

APPLICATION_ATOM_XML

APPLICATION_ATOM_XML_TYPE

public static final MediaType APPLICATION_ATOM_XML_TYPE

APPLICATION_XHTML_XML

APPLICATION_XHTML_XML_TYPE

public static final MediaType APPLICATION_XHTML_XML_TYPE

APPLICATION_SVG_XML

APPLICATION_SVG_XML_TYPE

APPLICATION_JSON

APPLICATION_JSON_TYPE

APPLICATION_FORM_URLENCODED

public static final String APPLICATION_FORM_URLENCODED

APPLICATION_FORM_URLENCODED_TYPE

public static final MediaType APPLICATION_FORM_URLENCODED_TYPE

MULTIPART_FORM_DATA

MULTIPART_FORM_DATA_TYPE

APPLICATION_OCTET_STREAM

APPLICATION_OCTET_STREAM_TYPE

public static final MediaType APPLICATION_OCTET_STREAM_TYPE

TEXT_PLAIN

TEXT_PLAIN_TYPE

TEXT_XML

TEXT_XML_TYPE

TEXT_HTML

TEXT_HTML_TYPE

Constructor Detail

MediaType

public MediaType(String type, String subtype, Map parameters)

MediaType

MediaType

public MediaType(String type, String subtype, String charset)

MediaType

Creates a new instance of MediaType , both type and subtype are wildcards. Consider using the constant WILDCARD_TYPE instead.

Method Detail

valueOf

getType

isWildcardType

public boolean isWildcardType()

getSubtype

isWildcardSubtype

public boolean isWildcardSubtype()

getParameters

public MapString,String> getParameters()

withCharset

public MediaType withCharset(String charset)

Create a new MediaType instance with the same type, subtype and parameters copied from the original instance and the supplied «»charset»» parameter.

isCompatible

Check if this media type is compatible with another media type. E.g. image/* is compatible with image/jpeg, image/png, etc. Media type parameters are ignored. The function is commutative.

equals

Compares obj to this media type to see if they are the same by comparing type, subtype and parameters. Note that the case-sensitivity of parameter values is dependent on the semantics of the parameter name, see HTTP/1.1. This method assumes that values are case-sensitive. Note that the equals(. ) implementation does not perform a class equality check ( this.getClass() == obj.getClass() ). Therefore any class that extends from MediaType class and needs to override one of the equals(. ) and hashCode() methods must always override both methods to ensure the contract between Object.equals(java.lang.Object) and Object.hashCode() does not break.

hashCode

Generate a hash code from the type, subtype and parameters. Note that the equals(java.lang.Object) implementation does not perform a class equality check ( this.getClass() == obj.getClass() ). Therefore any class that extends from MediaType class and needs to override one of the equals(Object) and hashCode() methods must always override both methods to ensure the contract between Object.equals(java.lang.Object) and Object.hashCode() does not break.

toString

Источник

Оцените статью