Class ContentTypeBuilder


  • public final class ContentTypeBuilder
    extends Object
    Deprecated.
    Use ContentType.Builder instead.
    Builder for ContentType objects. This class can be used to construct ContentType objects or as a mutable alternative to ContentType (which is designed to be immutable).
    • Constructor Detail

      • ContentTypeBuilder

        public ContentTypeBuilder​(org.apache.axiom.mime.MediaType mediaType)
        Deprecated.
        Constructor that initializes the builder with a media type and no parameters.
        Parameters:
        mediaType - the media type
      • ContentTypeBuilder

        public ContentTypeBuilder​(org.apache.axiom.mime.ContentType type)
        Deprecated.
        Constructor that initializes the builder with the media type and parameters from an existing ContentType object.
        Parameters:
        type - the content type
      • ContentTypeBuilder

        public ContentTypeBuilder​(String type)
                           throws ParseException
        Deprecated.
        Constructor that parses a Content-Type header value.
        Parameters:
        type - the value of the Content-Type header conforming to RFC 2045
        Throws:
        ParseException - if the value is invalid and could not be parsed
    • Method Detail

      • getMediaType

        public org.apache.axiom.mime.MediaType getMediaType()
        Deprecated.
        Get the media type.
        Returns:
        the media type
      • setMediaType

        public void setMediaType​(org.apache.axiom.mime.MediaType mediaType)
        Deprecated.
        Set the media type.
        Parameters:
        mediaType - the media type
      • getParameter

        public String getParameter​(String name)
        Deprecated.
        Get the specified parameter value.
        Parameters:
        name - the parameter name
        Returns:
        the parameter value, or null if no parameter with the given name was found
      • setParameter

        public void setParameter​(String name,
                                 String value)
        Deprecated.
        Set the specified parameter value. If a parameter with the given name already exists, it will be replaced. Note that parameter names are case insensitive.
        Parameters:
        name - the parameter name
        value - the parameter value
      • removeParameter

        public void removeParameter​(String name)
        Deprecated.
        Remove the parameter with the specified name.
        Parameters:
        name - the parameter name
      • clearParameters

        public void clearParameters()
        Deprecated.
        Remove all parameters.
      • build

        public org.apache.axiom.mime.ContentType build()
        Deprecated.
        Build the ContentType object.
        Returns:
        the ContentType object
      • toString

        public String toString()
        Deprecated.
        Create a string representation of the content type. This method uses the same conventions as ContentType.toString().
        Overrides:
        toString in class Object
        Returns:
        the string representation of this content type