diff --git a/spring-core/src/main/java/org/springframework/util/MimeType.java b/spring-core/src/main/java/org/springframework/util/MimeType.java index 894a0dc594..f4ca7953ed 100644 --- a/spring-core/src/main/java/org/springframework/util/MimeType.java +++ b/spring-core/src/main/java/org/springframework/util/MimeType.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,8 +29,10 @@ import java.util.TreeSet; /** * Represents a MIME Type, as originally defined in RFC 2046 and subsequently used in - * other Internet protocols including HTTP. This class however does not contain support - * the q-parameters used in HTTP content negotiation. Those can be found in the sub-class + * other Internet protocols including HTTP. + * + *
This class, however, does not contain support for the q-parameters used + * in HTTP content negotiation. Those can be found in the sub-class * {@code org.springframework.http.MediaType} in the {@code spring-web} module. * *
Consists of a {@linkplain #getType() type} and a {@linkplain #getSubtype() subtype}.
@@ -40,6 +42,7 @@ import java.util.TreeSet;
* @author Arjen Poutsma
* @author Juergen Hoeller
* @author Rossen Stoyanchev
+ * @author Sam Brannen
* @since 4.0
* @see MimeTypeUtils
*/
@@ -99,9 +102,10 @@ public class MimeType implements Comparable The {@linkplain #getSubtype() subtype} is set to "*", parameters empty.
+ * The {@linkplain #getSubtype() subtype} is set to The parameters are empty.
* @param type the primary type
* @param subtype the subtype
- * @throws IllegalArgumentException if any of the parameters contain illegal characters
+ * @throws IllegalArgumentException if any of the parameters contains illegal characters
*/
public MimeType(String type, String subtype) {
this(type, subtype, Collections."*"
,
+ * and the parameters are empty.
* @param type the primary type
- * @throws IllegalArgumentException if any of the parameters contain illegal characters
+ * @throws IllegalArgumentException if any of the parameters contains illegal characters
*/
public MimeType(String type) {
this(type, WILDCARD_TYPE);
@@ -112,7 +116,7 @@ public class MimeType implements Comparable*
or not.
*/
public boolean isWildcardType() {
return WILDCARD_TYPE.equals(getType());
}
/**
- * Indicates whether the {@linkplain #getSubtype() subtype} is the wildcard character
- * {@code *} or the wildcard character followed by a sufiix (e.g.
- * {@code *+xml}), or not.
- * @return whether the subtype is {@code *}
+ * Indicates whether the {@linkplain #getSubtype() subtype} is the wildcard
+ * character *
or the wildcard character followed by a suffix
+ * (e.g. *+xml
).
+ * @return whether the subtype is a wildcard
*/
public boolean isWildcardSubtype() {
return WILDCARD_TYPE.equals(getSubtype()) || getSubtype().startsWith("*+");
}
/**
- * Indicates whether this media type is concrete, i.e. whether neither the type or
- * subtype is a wildcard character {@code *}.
+ * Indicates whether this media type is concrete, i.e. whether neither the type
+ * nor the subtype is a wildcard character *
.
* @return whether this media type is concrete
*/
public boolean isConcrete() {