AlternateView

Inheritance: java.lang.Object, com.aspose.email.AttachmentBase

public class AlternateView extends AttachmentBase

Represents the format to view a message.

Constructors

Constructor Description
AlternateView(String fileName) Initializes a new instance of the AlternateView class.
AlternateView(String fileName, String mediaType) Initializes a new instance of the AlternateView class.
AlternateView(String fileName, ContentType contentType) Initializes a new instance of the AlternateView class.
AlternateView(InputStream contentStream) Initializes a new instance of the AlternateView class.
AlternateView(InputStream contentStream, String mediaType) Initializes a new instance of the AlternateView class.
AlternateView(InputStream contentStream, ContentType contentType) Initializes a new instance of the AlternateView class.

Methods

Method Description
getLinkedResources() Gets the set of embedded resources referred to by this alternate view.
getBaseUri() Gets or sets the base URI.
setBaseUri(URI value) Gets or sets the base URI.
createAlternateViewFromString(String content) Creates a AlternateView of using the content specified in a string.
createAlternateViewFromString(String content, Charset contentEncoding, String mediaType) Creates a AlternateView of using the content specified in a string.
createAlternateViewFromString(String content, ContentType contentType) Creates a AlternateView of using the content specified in a string.
createAlternateViewFromString(String content, ContentType contentType, int transferencoding) Creates a AlternateView of using the content specified in a string.

AlternateView(String fileName)

public AlternateView(String fileName)

Initializes a new instance of the AlternateView class.

Parameters:

Parameter Type Description
fileName java.lang.String Name of the file.

AlternateView(String fileName, String mediaType)

public AlternateView(String fileName, String mediaType)

Initializes a new instance of the AlternateView class.

Parameters:

Parameter Type Description
fileName java.lang.String Name of the file.
mediaType java.lang.String Internet media type.

AlternateView(String fileName, ContentType contentType)

public AlternateView(String fileName, ContentType contentType)

Initializes a new instance of the AlternateView class.

Parameters:

Parameter Type Description
fileName java.lang.String Name of the file.
contentType ContentType Content type.

AlternateView(InputStream contentStream)

public AlternateView(InputStream contentStream)

Initializes a new instance of the AlternateView class.

Parameters:

Parameter Type Description
contentStream java.io.InputStream The content stream.

AlternateView(InputStream contentStream, String mediaType)

public AlternateView(InputStream contentStream, String mediaType)

Initializes a new instance of the AlternateView class.

Parameters:

Parameter Type Description
contentStream java.io.InputStream The content stream.
mediaType java.lang.String Internet media type.

AlternateView(InputStream contentStream, ContentType contentType)

public AlternateView(InputStream contentStream, ContentType contentType)

Initializes a new instance of the AlternateView class.

Parameters:

Parameter Type Description
contentStream java.io.InputStream The content stream.
contentType ContentType Content type.

getLinkedResources()

public final LinkedResourceCollection getLinkedResources()

Gets the set of embedded resources referred to by this alternate view.

Value: The linked resources.

Returns: LinkedResourceCollection

getBaseUri()

public final URI getBaseUri()

Gets or sets the base URI.

Value: The base URI.

Returns: java.net.URI

setBaseUri(URI value)

public final void setBaseUri(URI value)

Gets or sets the base URI.

Value: The base URI.

Parameters:

Parameter Type Description
value java.net.URI

createAlternateViewFromString(String content)

public static AlternateView createAlternateViewFromString(String content)

Creates a AlternateView of using the content specified in a string.

Parameters:

Parameter Type Description
content java.lang.String The string that contains the content.

Returns: AlternateView - An AlternateView object that represents an alternate view.

createAlternateViewFromString(String content, Charset contentEncoding, String mediaType)

public static AlternateView createAlternateViewFromString(String content, Charset contentEncoding, String mediaType)

Creates a AlternateView of using the content specified in a string.

Parameters:

Parameter Type Description
content java.lang.String The string that contains the content.
contentEncoding java.nio.charset.Charset The content encoding.
mediaType java.lang.String Internet media type.

Returns: AlternateView - An AlternateView object that represents an alternate view.

createAlternateViewFromString(String content, ContentType contentType)

public static AlternateView createAlternateViewFromString(String content, ContentType contentType)

Creates a AlternateView of using the content specified in a string.

Parameters:

Parameter Type Description
content java.lang.String The string that contains the content.
contentType ContentType Content type.

Returns: AlternateView - An AlternateView object that represents an alternate view.

createAlternateViewFromString(String content, ContentType contentType, int transferencoding)

public static AlternateView createAlternateViewFromString(String content, ContentType contentType, int transferencoding)

Creates a AlternateView of using the content specified in a string.

Parameters:

Parameter Type Description
content java.lang.String The string that contains the content.
contentType ContentType Content type.
transferencoding int The transfer encoding.

Returns: AlternateView - An AlternateView object that represents an alternate view.