public class AlternateView extends AttachmentBase
Represents the format to view a message.
| Constructor and Description |
|---|
AlternateView(InputStream contentStream)
Initializes a new instance of the
AlternateView class. |
AlternateView(InputStream contentStream,
ContentType contentType)
Initializes a new instance of the
AlternateView class. |
AlternateView(InputStream contentStream,
String mediaType)
Initializes a new instance of the
AlternateView class. |
AlternateView(String fileName)
Initializes a new instance of the
AlternateView class. |
AlternateView(String fileName,
ContentType contentType)
Initializes a new instance of the
AlternateView class. |
AlternateView(String fileName,
String mediaType)
Initializes a new instance of the
AlternateView class. |
| Modifier and Type | Method and Description |
|---|---|
static AlternateView |
createAlternateViewFromString(String content)
Creates a AlternateView of using
the content specified in a string.
|
static AlternateView |
createAlternateViewFromString(String content,
Charset contentEncoding,
String mediaType)
Creates a AlternateView of using
the content specified in a string.
|
static AlternateView |
createAlternateViewFromString(String content,
ContentType contentType)
Creates a AlternateView of using
the content specified in a string.
|
static AlternateView |
createAlternateViewFromString(String content,
ContentType contentType,
int transferencoding)
Creates a AlternateView of using
the content specified in a string.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources.
|
URI |
getBaseUri()
Gets or sets the base URI.
|
LinkedResourceCollection |
getLinkedResources()
Gets the set of embedded resources referred to by this alternate view.
|
void |
setBaseUri(URI value)
Gets or sets the base URI.
|
close, dispose, generateContentId, getContentId, getContentStream, getContentType, getEncodingFromContent, getHeaders, getTransferEncoding, save, save, setContentId, setContentStream, setContentType, setTransferEncodingpublic AlternateView(String fileName)
Initializes a new instance of the AlternateView class.
fileName - Name of the file.public AlternateView(String fileName, String mediaType)
Initializes a new instance of the AlternateView class.
fileName - Name of the file.mediaType - Internet media type.public AlternateView(String fileName, ContentType contentType)
Initializes a new instance of the AlternateView class.
fileName - Name of the file.contentType - Content type.public AlternateView(InputStream contentStream)
Initializes a new instance of the AlternateView class.
contentStream - The content stream.public AlternateView(InputStream contentStream, String mediaType)
Initializes a new instance of the AlternateView class.
contentStream - The content stream.mediaType - Internet media type.public AlternateView(InputStream contentStream, ContentType contentType)
Initializes a new instance of the AlternateView class.
contentStream - The content stream.contentType - Content type.public final LinkedResourceCollection getLinkedResources()
Gets the set of embedded resources referred to by this alternate view.
Value: The linked resources.public final URI getBaseUri()
Gets or sets the base URI.
Value: The base URI.public final void setBaseUri(URI value)
Gets or sets the base URI.
Value: The base URI.public static AlternateView createAlternateViewFromString(String content)
Creates a AlternateView of using the content specified in a string.
content - The string that contains the content.public static AlternateView createAlternateViewFromString(String content, Charset contentEncoding, String mediaType)
Creates a AlternateView of using the content specified in a string.
content - The string that contains the content.contentEncoding - The content encoding.mediaType - Internet media type.public static AlternateView createAlternateViewFromString(String content, ContentType contentType)
Creates a AlternateView of using the content specified in a string.
content - The string that contains the content.contentType - Content type.public static AlternateView createAlternateViewFromString(String content, ContentType contentType, int transferencoding)
Creates a AlternateView of using the content specified in a string.
content - The string that contains the content.contentType - Content type.transferencoding - The transfer encoding.protected void dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources.
dispose in class AttachmentBasedisposing - true to release
both managed and unmanaged resources; false to release only unmanaged resources.Copyright (c) 2008-2021 Aspose Pty Ltd. All Rights Reserved.