com.aspose.email
Class LinkedResource

java.lang.Object
  extended by com.aspose.email.AttachmentBase
      extended by com.aspose.email.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
static LinkedResource createLinkedResourceFromString(String content)
           Creates the linked resource from string.
static LinkedResource createLinkedResourceFromString(String content, Charset contentEncoding, String mediaType)
           
static LinkedResource 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.Uri value)
           
 
Methods inherited from class com.aspose.email.AttachmentBase
dispose, getContentId, getContentStream, getContentType, getTransferEncoding, save, save, saveRawContent, setContentId, setContentStream, setContentType, setTransferEncoding
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)

LinkedResource

public LinkedResource(InputStream contentStream,
                      String mediaType)

LinkedResource

public LinkedResource(InputStream contentStream,
                      ContentType contentType)
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,
                                                            Charset contentEncoding,
                                                            String mediaType)

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.


Copyright (c) 2008-2012 Aspose Pty Ltd. All Rights Reserved.