Browse Source

Polish

pull/1472/head
Rossen Stoyanchev 9 years ago
parent
commit
e0de7754cc
  1. 83
      spring-web/src/main/java/org/springframework/http/MediaType.java

83
spring-web/src/main/java/org/springframework/http/MediaType.java

@ -101,7 +101,7 @@ public class MediaType extends MimeType implements Serializable { @@ -101,7 +101,7 @@ public class MediaType extends MimeType implements Serializable {
/**
* A String equivalent of {@link MediaType#APPLICATION_JSON_UTF8}.
*/
public final static String APPLICATION_JSON_UTF8_VALUE = APPLICATION_JSON_VALUE + ";charset=UTF-8";
public final static String APPLICATION_JSON_UTF8_VALUE = "application/json;charset=UTF-8";
/**
* Public constant media type for {@code application/octet-stream}.
@ -125,6 +125,48 @@ public class MediaType extends MimeType implements Serializable { @@ -125,6 +125,48 @@ public class MediaType extends MimeType implements Serializable {
*/
public final static String APPLICATION_PDF_VALUE = "application/pdf";
/**
* Public constant media type for {@code application/problem+json}.
* @since 5.0
* @see <a href="https://tools.ietf.org/html/rfc7807#section-6.1">
* Problem Details for HTTP APIs, 6.1. application/problem+json</a>
*/
public final static MediaType APPLICATION_PROBLEM_JSON;
/**
* A String equivalent of {@link MediaType#APPLICATION_PROBLEM_JSON}.
* @since 5.0
*/
public final static String APPLICATION_PROBLEM_JSON_VALUE = "application/problem+json";
/**
* Public constant media type for {@code application/problem+json}.
* @since 5.0
* @see <a href="https://tools.ietf.org/html/rfc7807#section-6.1">
* Problem Details for HTTP APIs, 6.1. application/problem+json</a>
*/
public final static MediaType APPLICATION_PROBLEM_JSON_UTF8;
/**
* A String equivalent of {@link MediaType#APPLICATION_PROBLEM_JSON_UTF8}.
* @since 5.0
*/
public final static String APPLICATION_PROBLEM_JSON_UTF8_VALUE = "application/problem+json;charset=UTF-8";
/**
* Public constant media type for {@code application/problem+xml}.
* @since 5.0
* @see <a href="https://tools.ietf.org/html/rfc7807#section-6.2">
* Problem Details for HTTP APIs, 6.2. application/problem+xml</a>
*/
public final static MediaType APPLICATION_PROBLEM_XML;
/**
* A String equivalent of {@link MediaType#APPLICATION_PROBLEM_XML}.
* @since 5.0
*/
public final static String APPLICATION_PROBLEM_XML_VALUE = "application/problem+xml";
/**
* Public constant media type for {@code application/rss+xml}.
* @since 4.3.6
@ -264,45 +306,6 @@ public class MediaType extends MimeType implements Serializable { @@ -264,45 +306,6 @@ public class MediaType extends MimeType implements Serializable {
*/
public final static String TEXT_XML_VALUE = "text/xml";
/**
* Public constant media type for {@code application/problem+json}.
* @since 5.0
* @see <a href="https://tools.ietf.org/html/rfc7807#section-6.1">Problem Details for HTTP APIs, 6.1. application/problem+json</a>
*/
public final static MediaType APPLICATION_PROBLEM_JSON;
/**
* A String equivalent of {@link MediaType#APPLICATION_PROBLEM_JSON}.
* @since 5.0
*/
public final static String APPLICATION_PROBLEM_JSON_VALUE = "application/problem+json";
/**
* Public constant media type for {@code application/problem+json}.
* @since 5.0
* @see <a href="https://tools.ietf.org/html/rfc7807#section-6.1">Problem Details for HTTP APIs, 6.1. application/problem+json</a>
*/
public final static MediaType APPLICATION_PROBLEM_JSON_UTF8;
/**
* A String equivalent of {@link MediaType#APPLICATION_PROBLEM_JSON_UTF8}.
* @since 5.0
*/
public final static String APPLICATION_PROBLEM_JSON_UTF8_VALUE = APPLICATION_PROBLEM_JSON_VALUE + ";charset=UTF-8";
/**
* Public constant media type for {@code application/problem+xml}.
* @since 5.0
* @see <a href="https://tools.ietf.org/html/rfc7807#section-6.2">Problem Details for HTTP APIs, 6.2. application/problem+xml</a>
*/
public final static MediaType APPLICATION_PROBLEM_XML;
/**
* A String equivalent of {@link MediaType#APPLICATION_PROBLEM_XML}.
* @since 5.0
*/
public final static String APPLICATION_PROBLEM_XML_VALUE = "application/problem+xml";
private static final String PARAM_QUALITY_FACTOR = "q";

Loading…
Cancel
Save