com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class AlternateView

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


    public class AlternateView
    extends AttachmentBase

    Represents the format to view a message.

    • Constructor Detail

      • AlternateView

        public AlternateView(String fileName)

        Initializes a new instance of the AlternateView class.

        Parameters:
        fileName - Name of the file.
      • AlternateView

        public AlternateView(String fileName,
                     String mediaType)

        Initializes a new instance of the AlternateView class.

        Parameters:
        fileName - Name of the file.
        mediaType - Internet media type.
      • AlternateView

        public AlternateView(String fileName,
                     ContentType contentType)

        Initializes a new instance of the AlternateView class.

        Parameters:
        fileName - Name of the file.
        contentType - Content type.
      • AlternateView

        public AlternateView(InputStream contentStream)

        Initializes a new instance of the AlternateView class.

        Parameters:
        contentStream - The content stream.
      • AlternateView

        public AlternateView(InputStream contentStream,
                     String mediaType)

        Initializes a new instance of the AlternateView class.

        Parameters:
        contentStream - The content stream.
        mediaType - Internet media type.
      • AlternateView

        public AlternateView(InputStream contentStream,
                     ContentType contentType)

        Initializes a new instance of the AlternateView class.

        Parameters:
        contentStream - The content stream.
        contentType - Content type.
    • Method Detail

      • getLinkedResources

        public LinkedResourceCollection getLinkedResources()

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

        Value: The linked resources.
      • getBaseUri

        public URI getBaseUri()

        Gets or sets the base URI.

        Value: The base URI.
        Returns:
        a URI object.
      • setBaseUri

        public void setBaseUri(URI value)

        Gets or sets the base URI.

        Value: The base URI.
        Parameters:
        value - a URI object.
      • createAlternateViewFromString

        public static AlternateView createAlternateViewFromString(String content)

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

        Parameters:
        content - The string that contains the content.
        Returns:
        An AlternateView object that represents an alternate view.
      • createAlternateViewFromString

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

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

        Parameters:
        content - The string that contains the content.
        contentEncoding - The content encoding.
        mediaType - Internet media type.
        Returns:
        An AlternateView object that represents an alternate view.
      • createAlternateViewFromString

        public static AlternateView createAlternateViewFromString(String content,
                                                  ContentType contentType)

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

        Parameters:
        content - The string that contains the content.
        contentType - Content type.
        Returns:
        An AlternateView object that represents an alternate view.
      • createAlternateViewFromString

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

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

        Parameters:
        content - The string that contains the content.
        contentType - Content type.
        transferencoding - The transfer encoding.
        Returns:
        An AlternateView object that represents an alternate view.
      • dispose

        protected void dispose(boolean disposing)

        Releases unmanaged and - optionally - managed resources.

        Overrides:
        dispose in class AttachmentBase
        Parameters:
        disposing - true to release both managed and unmanaged resources; false to release only unmanaged resources.