public class LinkedResource extends AttachmentBase
Represents an embedded resource in a message.
| Constructor and Description |
|---|
LinkedResource(InputStream contentStream)
Initializes a new instance of the
LinkedResource class. |
LinkedResource(InputStream contentStream,
ContentType contentType)
Initializes a new instance of the
LinkedResource class. |
LinkedResource(InputStream contentStream,
String mediaType)
Initializes a new instance of the
LinkedResource class. |
LinkedResource(String fileName)
Initializes a new instance of the
LinkedResource class. |
LinkedResource(String fileName,
ContentType contentType)
Initializes a new instance of the
LinkedResource class. |
LinkedResource(String fileName,
String mediaType)
Initializes a new instance of the
LinkedResource class. |
| Modifier and Type | Method and Description |
|---|---|
static LinkedResource |
createLinkedResourceFromString(String content)
Creates the linked resource from string.
|
static LinkedResource |
createLinkedResourceFromString(String content,
Charset contentEncoding,
String mediaType)
Creates the linked resource from string.
|
static LinkedResource |
createLinkedResourceFromString(String content,
ContentType contentType)
Creates the linked resource from string.
|
ContentDisposition |
getContentDisposition()
Gets Content-Disposition header
|
URI |
getContentLink()
Gets or sets a URI that the resource must match.
|
void |
setContentLink(URI value)
Gets or sets a URI that the resource must match.
|
close, dispose, dispose, generateContentId, getContentId, getContentStream, getContentType, getEncodingFromContent, getHeaders, getTransferEncoding, save, save, setContentId, setContentStream, setContentType, setTransferEncodingpublic LinkedResource(String fileName)
Initializes a new instance of the LinkedResource class.
fileName - The file name that holds the content for this resource.public LinkedResource(String fileName, String mediaType)
Initializes a new instance of the LinkedResource class.
fileName - The file name that holds the content for this resource.mediaType - Internet media type.public LinkedResource(String fileName, ContentType contentType)
Initializes a new instance of the LinkedResource class.
fileName - The file name that holds the content for this resource.contentType - The type of content.public LinkedResource(InputStream contentStream)
Initializes a new instance of the LinkedResource class.
contentStream - A stream that contains the content for this resource.public LinkedResource(InputStream contentStream, String mediaType)
Initializes a new instance of the LinkedResource class.
contentStream - A stream that contains the content for this resource.mediaType - Internet media type.public LinkedResource(InputStream contentStream, ContentType contentType)
Initializes a new instance of the LinkedResource class.
contentStream - A stream that contains the content for this resource.contentType - The type of content.public final URI getContentLink()
Gets or sets a URI that the resource must match.
public final void setContentLink(URI value)
Gets or sets a URI that the resource must match.
public final ContentDisposition getContentDisposition()
Gets Content-Disposition header
public static LinkedResource createLinkedResourceFromString(String content)
Creates the linked resource from string.
content - A string that contains the resource to be included in the email attachment.public static LinkedResource createLinkedResourceFromString(String content, Charset contentEncoding, String mediaType)
Creates the linked resource from string.
content - A string that contains the resource to be included in the email attachment.contentEncoding - The content encoding.mediaType - The MIME media type of the content.public static LinkedResource createLinkedResourceFromString(String content, ContentType contentType)
Creates the linked resource from string.
content - A string that contains the resource to be included in the email attachment.contentType - The type of the content.Copyright (c) 2008-2021 Aspose Pty Ltd. All Rights Reserved.