com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class LinkedResource

  • All Implemented Interfaces:
    com.aspose.ms.System.IDisposable


    public class LinkedResource
    extends AttachmentBase

    Represents an embedded resource in a message.

    • 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)

        Initializes a new instance of the LinkedResource class.

        Parameters:
        contentStream - A stream that contains the content for this resource.
      • LinkedResource

        public LinkedResource(InputStream contentStream,
                      String mediaType)

        Initializes a new instance of the LinkedResource class.

        Parameters:
        contentStream - A stream that contains the content for this resource.
        mediaType - Internet media type.
      • LinkedResource

        public LinkedResource(InputStream contentStream,
                      ContentType contentType)

        Initializes a new instance of the LinkedResource class.

        Parameters:
        contentStream - A stream that contains the content for this resource.
        contentType - The type of content.
    • Method Detail

      • getContentLink

        public URI getContentLink()

        Gets or sets a URI that the resource must match.

      • setContentLink

        public void setContentLink(URI value)

        Gets or sets a URI that the resource must match.

      • 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,
                                                    Charset contentEncoding,
                                                    String mediaType)

        Creates the linked resource from string.

        Parameters:
        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.
        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.