com.upokecenter.mail.MediaTypeBuilder

# com.upokecenter.mail.MediaTypeBuilder

@Deprecated public final class MediaTypeBuilder extends Object

A mutable media type object.

Constructors

Methods

Method Details

getTopLevelType

public final String getTopLevelType() Gets this value's top-level type.

Returns:

Throws:

setTopLevelType

public final void setTopLevelType(String value) ### getSubType
public final String getSubType() Gets this value's subtype.

Returns:

Throws:

setSubType

public final void setSubType(String value) ### isText
@Deprecated public final boolean isText() Gets a value indicating whether this is a text media type.

Returns:

isMultipart

@Deprecated public final boolean isMultipart() Gets a value indicating whether this is a multipart media type.

Returns:

ToMediaType

public MediaType ToMediaType() Converts this builder to an immutable media type object.

Returns:

SetTopLevelType

public MediaTypeBuilder SetTopLevelType(String str) Sets this media type's top-level type. This method enables the pattern of  method chaining (e.g., <code>new...().getSet()...().getSet()...()</code>) unlike with the  TopLevelType property in.NET or the setTopLevelType method (with small s) in  Java.

Parameters:

Returns:

Throws:

RemoveParameter

public MediaTypeBuilder RemoveParameter(String name) Removes a parameter from this builder object. Does nothing if the  parameter's name doesn't exist.

Parameters:

Returns:

Throws:

SetParameter

public MediaTypeBuilder SetParameter(String name, String value) Sets a parameter's name and value for this media type.

Parameters:

Returns:

Throws:

SetSubType

public MediaTypeBuilder SetSubType(String str) Sets this media type's subtype, such as "plain" or "xml" . This method  enables the pattern of method chaining (e.g., <code>  new...().getSet()...().getSet()...()</code>) unlike with the SubType property in.NET or the  setSubType method (with small s) in Java.

Parameters:

Returns:

Throws:

toString

public String toString() Converts this object to a text string of the media type it represents, in  the same form as <code>MediaType.toString</code>.

Overrides:

Returns:

Back to MailLib start page.