com.aspose.email

com.aspose.email

Class LinkedResource

All Implemented Interfaces:
com.aspose.email.ms.System.IDisposable
public class LinkedResource
extends AttachmentBase

Represents an embedded resource in a message.

Constructor Summary
LinkedResource(InputStream contentStream)
LinkedResource(InputStream contentStream, ContentType contentType)
LinkedResource(InputStream contentStream, String mediaType)
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.
 
Method Summary
createLinkedResourceFromString(String content)
Creates the linked resource from string.
createLinkedResourceFromString(String content, Charset contentEncoding, String mediaType)
createLinkedResourceFromString(String content, ContentType contentType)
Creates the linked resource from string.
com.aspose.email.ms.System.Uri
getContentLink()
Gets or sets a URI that the resource must match.
void
setContentLink(com.aspose.email.ms.System.Urivalue)
 
Methods inherited from class com.aspose.email.AttachmentBase
 
Methods inherited from class java.lang.Object
 

    • Constructor Detail

      • LinkedResource

        public LinkedResource(String fileName)

        Initializes a new instance of the LinkedResource class.

        Parameters:
        fileName - The file name that holds the content for this resource.
      • LinkedResource

        public LinkedResource(String fileName,
                              String mediaType)

        Initializes a new instance of the LinkedResource class.

        Parameters:
        fileName - The file name that holds the content for this resource.
        mediaType - Internet media type.
      • LinkedResource

        public LinkedResource(String fileName,
                              ContentType contentType)

        Initializes a new instance of the LinkedResource class.

        Parameters:
        fileName - The file name that holds the content for this resource.
        contentType - The type of content.
      • LinkedResource

        public LinkedResource(InputStream contentStream)
    • Method Detail

      • getContentLink

        public com.aspose.email.ms.System.Uri getContentLink()

        Gets or sets a URI that the resource must match.

      • setContentLink

        public void setContentLink(com.aspose.email.ms.System.Uri value)
      • createLinkedResourceFromString

        public static LinkedResource createLinkedResourceFromString(String content)

        Creates the linked resource from string.

        Parameters:
        content - A string that contains the resource to be included in the email attachment.
        Returns:
        A LinkedResource object that contains the embedded resource.
      • createLinkedResourceFromString

        public static LinkedResource createLinkedResourceFromString(String content,
                                                                    ContentType contentType)

        Creates the linked resource from string.

        Parameters:
        content - A string that contains the resource to be included in the email attachment.
        contentType - The type of the content.
        Returns:
        A LinkedResource object that contains the embedded resource.