@MustImplementEqualsAndHashcode @MustImplementComparable public interface IMimeType extends ICloneable<IMimeType>, Serializable
| Modifier and Type | Method and Description |
|---|---|
ICommonsList<MimeTypeParameter> |
getAllParameters() |
default String |
getAsString()
Get the MIME type including all parameters as a single string.
|
String |
getAsString(EMimeQuoting eQuotingAlgorithm)
Get the MIME type including all parameters as a single string.
|
String |
getAsStringWithoutParameters() |
String |
getContentSubType() |
EMimeContentType |
getContentType() |
IMimeType |
getCopyWithoutParameters() |
MimeTypeParameter |
getParameterAtIndex(int nIndex)
Get the parameter at the specified index.
|
int |
getParameterCount() |
String |
getParametersAsString(EMimeQuoting eQuotingAlgorithm)
Get all MIME type parameters as a single string but without the leading
content and sub type.
|
String |
getParameterValueWithName(String sParamName)
Get the value of the parameter with the specified name.
|
MimeTypeParameter |
getParameterWithName(String sParamName)
Get the parameter with the specified name.
|
boolean |
hasAnyParameters() |
default boolean |
hasParameterWithName(String sParamName)
Check if a parameter with the specified name is present.
|
getClone@Nonnull EMimeContentType getContentType()
null.@Nonnull default String getAsString()
CMimeType.DEFAULT_QUOTING quoting algorithm is used.contentType '/' subType ( ';'
parameterName '=' parameterValue )*getAsString(EMimeQuoting),
getAsStringWithoutParameters()@Nonnull @Nonempty String getAsString(@Nonnull EMimeQuoting eQuotingAlgorithm)
eQuotingAlgorithm - Quoting algorithm to be usedcontentType '/' subType ( ';'
parameterName '=' parameterValue )*getAsStringWithoutParameters(),
getParametersAsString(EMimeQuoting)@Nonnull @Nonempty String getAsStringWithoutParameters()
contentType '/'
subTypegetAsString()@Nonnull String getParametersAsString(@Nonnull EMimeQuoting eQuotingAlgorithm)
eQuotingAlgorithm - Quoting algorithm to be used(';' parameterName '=' parameterValue
)* . If no parameters are present, an empty String is
returned!getAsString(EMimeQuoting),
getAsStringWithoutParameters()boolean hasAnyParameters()
true if at least one parameter is present,
false if no parameter is present.@Nonnegative int getParameterCount()
@Nonnull @ReturnsMutableCopy ICommonsList<MimeTypeParameter> getAllParameters()
null but empty.@Nullable MimeTypeParameter getParameterAtIndex(@Nonnegative int nIndex)
nIndex - The index to use. Should be ≥ 0.null if the provided index is illegal.default boolean hasParameterWithName(@Nullable String sParamName)
sParamName - The parameter name to search. May be null.true if such a parameter exists.@Nullable MimeTypeParameter getParameterWithName(@Nullable String sParamName)
sParamName - The parameter name to search. May be null.null if no such parameter exists.@Nullable String getParameterValueWithName(@Nullable String sParamName)
sParamName - The parameter name to search. May be null.null if no such parameter exists.Copyright © 2014–2020 Philip Helger. All rights reserved.