Interface IMimeType

    • Method Detail

      • getContentSubType

        @Nonnull
        String getContentSubType()
        Returns:
        The content sub type. Never null.
      • getAsStringWithoutParameters

        @Nonnull
        @Nonempty
        String getAsStringWithoutParameters()
        Returns:
        The combined string to be used as text representation but without the parameters: contentType '/' subType
        See Also:
        getAsString()
      • getParametersAsString

        @Nonnull
        String getParametersAsString​(@Nonnull
                                     EMimeQuoting eQuotingAlgorithm)
        Get all MIME type parameters as a single string but without the leading content and sub type. The specified quoting algorithm is used to quote parameter values.
        Parameters:
        eQuotingAlgorithm - Quoting algorithm to be used
        Returns:
        The combined string to be used as text representation: (';' parameterName '=' parameterValue )* . If no parameters are present, an empty String is returned!
        See Also:
        getAsString(EMimeQuoting), getAsStringWithoutParameters()
      • hasAnyParameters

        boolean hasAnyParameters()
        Returns:
        true if at least one parameter is present, false if no parameter is present.
      • getParameterCount

        @Nonnegative
        int getParameterCount()
        Returns:
        The number of parameters. Alway ≥ 0.
      • getParameterAtIndex

        @Nullable
        MimeTypeParameter getParameterAtIndex​(@Nonnegative
                                              int nIndex)
        Get the parameter at the specified index.
        Parameters:
        nIndex - The index to use. Should be ≥ 0.
        Returns:
        null if the provided index is illegal.
      • hasParameterWithName

        default boolean hasParameterWithName​(@Nullable
                                             String sParamName)
        Check if a parameter with the specified name is present. The names are matched case sensitive!
        Parameters:
        sParamName - The parameter name to search. May be null.
        Returns:
        true if such a parameter exists.
      • getParameterWithName

        @Nullable
        MimeTypeParameter getParameterWithName​(@Nullable
                                               String sParamName)
        Get the parameter with the specified name. The names are matched case sensitive!
        Parameters:
        sParamName - The parameter name to search. May be null.
        Returns:
        null if no such parameter exists.
      • getParameterValueWithName

        @Nullable
        String getParameterValueWithName​(@Nullable
                                         String sParamName)
        Get the value of the parameter with the specified name. The names are matched case sensitive!
        Parameters:
        sParamName - The parameter name to search. May be null.
        Returns:
        null if no such parameter exists.
      • getCopyWithoutParameters

        @Nonnull
        IMimeType getCopyWithoutParameters()
        Returns:
        A copy of this MIME type but only the content type and the sub type. This method must even deliver a copy if no parameter are present! May not return null.