31
31
import org .springframework .lang .Nullable ;
32
32
33
33
/**
34
- * Represents a MIME Type, as originally defined in RFC 2046 and subsequently used in
35
- * other Internet protocols including HTTP.
34
+ * Represents a MIME Type, as originally defined in RFC 2046 and subsequently
35
+ * used in other Internet protocols including HTTP.
36
36
*
37
37
* <p>This class, however, does not contain support for the q-parameters used
38
- * in HTTP content negotiation. Those can be found in the sub-class
38
+ * in HTTP content negotiation. Those can be found in the subclass
39
39
* {@code org.springframework.http.MediaType} in the {@code spring-web} module.
40
40
*
41
41
* <p>Consists of a {@linkplain #getType() type} and a {@linkplain #getSubtype() subtype}.
42
- * Also has functionality to parse media types from a string using
42
+ * Also has functionality to parse MIME Type values from a {@code String} using
43
43
* {@link #valueOf(String)}. For more parsing options see {@link MimeTypeUtils}.
44
44
*
45
45
* @author Arjen Poutsma
@@ -139,7 +139,7 @@ public MimeType(String type, String subtype, Charset charset) {
139
139
/**
140
140
* Copy-constructor that copies the type, subtype, parameters of the given {@code MimeType},
141
141
* and allows to set the specified character set.
142
- * @param other the other media type
142
+ * @param other the other MimeType
143
143
* @param charset the character set
144
144
* @throws IllegalArgumentException if any of the parameters contains illegal characters
145
145
* @since 4.3
@@ -151,8 +151,8 @@ public MimeType(MimeType other, Charset charset) {
151
151
/**
152
152
* Copy-constructor that copies the type and subtype of the given {@code MimeType},
153
153
* and allows for different parameter.
154
- * @param other the other media type
155
- * @param parameters the parameters, may be {@code null}
154
+ * @param other the other MimeType
155
+ * @param parameters the parameters ( may be {@code null})
156
156
* @throws IllegalArgumentException if any of the parameters contains illegal characters
157
157
*/
158
158
public MimeType (MimeType other , @ Nullable Map <String , String > parameters ) {
@@ -163,7 +163,7 @@ public MimeType(MimeType other, @Nullable Map<String, String> parameters) {
163
163
* Create a new {@code MimeType} for the given type, subtype, and parameters.
164
164
* @param type the primary type
165
165
* @param subtype the subtype
166
- * @param parameters the parameters, may be {@code null}
166
+ * @param parameters the parameters ( may be {@code null})
167
167
* @throws IllegalArgumentException if any of the parameters contains illegal characters
168
168
*/
169
169
public MimeType (String type , String subtype , @ Nullable Map <String , String > parameters ) {
@@ -246,9 +246,9 @@ public boolean isWildcardSubtype() {
246
246
}
247
247
248
248
/**
249
- * Indicates whether this media type is concrete, i.e. whether neither the type
249
+ * Indicates whether this MIME Type is concrete, i.e. whether neither the type
250
250
* nor the subtype is a wildcard character <code>*</code>.
251
- * @return whether this media type is concrete
251
+ * @return whether this MIME Type is concrete
252
252
*/
253
253
public boolean isConcrete () {
254
254
return !isWildcardType () && !isWildcardSubtype ();
@@ -298,12 +298,12 @@ public Map<String, String> getParameters() {
298
298
}
299
299
300
300
/**
301
- * Indicate whether this {@code MediaType} includes the given media type .
301
+ * Indicate whether this MIME Type includes the given MIME Type .
302
302
* <p>For instance, {@code text/*} includes {@code text/plain} and {@code text/html},
303
- * and {@code application/*+xml} includes {@code application/soap+xml}, etc. This
304
- * method is <b>not</b> symmetric.
305
- * @param other the reference media type with which to compare
306
- * @return {@code true} if this media type includes the given media type ;
303
+ * and {@code application/*+xml} includes {@code application/soap+xml}, etc.
304
+ * This method is <b>not</b> symmetric.
305
+ * @param other the reference MIME Type with which to compare
306
+ * @return {@code true} if this MIME Type includes the given MIME Type ;
307
307
* {@code false} otherwise
308
308
*/
309
309
public boolean includes (@ Nullable MimeType other ) {
@@ -342,12 +342,12 @@ else if (getType().equals(other.getType())) {
342
342
}
343
343
344
344
/**
345
- * Indicate whether this {@code MediaType} is compatible with the given media type .
345
+ * Indicate whether this MIME Type is compatible with the given MIME Type .
346
346
* <p>For instance, {@code text/*} is compatible with {@code text/plain},
347
347
* {@code text/html}, and vice versa. In effect, this method is similar to
348
348
* {@link #includes}, except that it <b>is</b> symmetric.
349
- * @param other the reference media type with which to compare
350
- * @return {@code true} if this media type is compatible with the given media type ;
349
+ * @param other the reference MIME Type with which to compare
350
+ * @return {@code true} if this MIME Type is compatible with the given MIME Type ;
351
351
* {@code false} otherwise
352
352
*/
353
353
public boolean isCompatibleWith (@ Nullable MimeType other ) {
@@ -458,8 +458,8 @@ private void appendTo(Map<String, String> map, StringBuilder builder) {
458
458
}
459
459
460
460
/**
461
- * Compares this {@code MediaType} to another alphabetically.
462
- * @param other media type to compare to
461
+ * Compares this MIME Type to another alphabetically.
462
+ * @param other the MIME Type to compare to
463
463
* @see MimeTypeUtils#sortBySpecificity(List)
464
464
*/
465
465
@ Override
0 commit comments