ReferenceAttachment
Inheritance: java.lang.Object, com.aspose.email.AttachmentBase, com.aspose.email.Attachment
public class ReferenceAttachment extends Attachment
This class represents a reference attachment
Constructors
| Constructor | Description |
|---|---|
| ReferenceAttachment() | Initializes a new instance of ReferenceAttachment. |
| ReferenceAttachment(URI uri) | Initializes a new instance of ReferenceAttachment. |
| ReferenceAttachment(String uri) | Initializes a new instance of ReferenceAttachment. |
Methods
| Method | Description |
|---|---|
| close() | |
| createAttachmentFromString(String content, ContentType contentType) | Creates the attachment from string. |
| createAttachmentFromString(String content, String name) | Creates the attachment from string. |
| createAttachmentFromString(String content, String name, Charset contentEncoding, String mediaType) | Creates the attachment from string. |
| dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
| equals(Object arg0) | |
| getClass() | |
| getContentDisposition() | Gets Content-Disposition header |
| getContentId() | Gets or sets the content id. |
| getContentStream() | Gets or sets the content stream. |
| getContentType() | Gets or sets the type of the content. |
| getHeaders() | Gets headers collection of attachment. |
| getName() | Gets or sets an attachment name |
| getNameEncoding() | Gets or sets an encoding of attachment name |
| getPermissionType() | Specifies the permission type. |
| getPreferredTextEncoding() | Gets or sets a preferred text encoding |
| getProviderType() | Specifies the provider type. |
| getTransferEncoding() | Gets or sets the transfer encoding. |
| getUri() | Specifies the Url of the provider endpoint. |
| hashCode() | |
| isEmbeddedMessage() | Gets a value indicating whether the attachment is an embedded message. |
| isUri() | Gets a value indicating whether attachment is URI-attachment. |
| notify() | |
| notifyAll() | |
| save(OutputStream stream) | Saves the specified stream. |
| save(String fileName) | Saves the specified file name. |
| setContentId(String value) | Gets or sets the content id. |
| setContentStream(InputStream value) | Gets or sets the content stream. |
| setContentType(ContentType value) | Gets or sets the type of the content. |
| setName(String value) | Gets or sets an attachment name |
| setNameEncoding(Charset value) | Gets or sets an encoding of attachment name |
| setPermissionType(int value) | Specifies the permission type. |
| setPreferredTextEncoding(Charset value) | Gets or sets a preferred text encoding |
| setProviderType(int value) | Specifies the provider type. |
| setTransferEncoding(int value) | Gets or sets the transfer encoding. |
| setUri(URI value) | Specifies the Url of the provider endpoint. |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
ReferenceAttachment()
public ReferenceAttachment()
Initializes a new instance of ReferenceAttachment.
ReferenceAttachment(URI uri)
public ReferenceAttachment(URI uri)
Initializes a new instance of ReferenceAttachment.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| uri | java.net.URI | Url |
ReferenceAttachment(String uri)
public ReferenceAttachment(String uri)
Initializes a new instance of ReferenceAttachment.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| uri | java.lang.String | string Url |
close()
public void close()
createAttachmentFromString(String content, ContentType contentType)
public static Attachment createAttachmentFromString(String content, ContentType contentType)
Creates the attachment from string.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| content | java.lang.String | A string that represents the content of attachment. |
| contentType | ContentType | The ContentType (AttachmentBase.getContentType/AttachmentBase.setContentType(ContentType)). |
Returns: Attachment - Returns created attachment
createAttachmentFromString(String content, String name)
public static Attachment createAttachmentFromString(String content, String name)
Creates the attachment from string.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| content | java.lang.String | A string that represents the content of attachment. |
| name | java.lang.String | The attachment name. |
Returns: Attachment - Returns created attachment
createAttachmentFromString(String content, String name, Charset contentEncoding, String mediaType)
public static Attachment createAttachmentFromString(String content, String name, Charset contentEncoding, String mediaType)
Creates the attachment from string.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| content | java.lang.String | A string that represents the content of attachment. |
| name | java.lang.String | The attachment name. |
| contentEncoding | java.nio.charset.Charset | The content encoding. |
| mediaType | java.lang.String | The media type name |
Returns: Attachment - Returns created attachment
dispose()
public final void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getContentDisposition()
public final ContentDisposition getContentDisposition()
Gets Content-Disposition header
Returns: ContentDisposition
getContentId()
public final String getContentId()
Gets or sets the content id.
Value: The content id.
Returns: java.lang.String
getContentStream()
public final InputStream getContentStream()
Gets or sets the content stream.
Value: The content stream.
Returns: java.io.InputStream
getContentType()
public final ContentType getContentType()
Gets or sets the type of the content.
Value: The type of the content.
Returns: ContentType
getHeaders()
public HeaderCollection getHeaders()
Gets headers collection of attachment.
Returns: HeaderCollection
getName()
public final String getName()
Gets or sets an attachment name
Returns: java.lang.String
getNameEncoding()
public final Charset getNameEncoding()
Gets or sets an encoding of attachment name
Returns: java.nio.charset.Charset
getPermissionType()
public final int getPermissionType()
Specifies the permission type.
Returns: int
getPreferredTextEncoding()
public final Charset getPreferredTextEncoding()
Gets or sets a preferred text encoding
Returns: java.nio.charset.Charset
getProviderType()
public final int getProviderType()
Specifies the provider type.
Returns: int
getTransferEncoding()
public final int getTransferEncoding()
Gets or sets the transfer encoding.
Value: The transfer encoding.
Returns: int
getUri()
public final URI getUri()
Specifies the Url of the provider endpoint.
Returns: java.net.URI
hashCode()
public native int hashCode()
Returns: int
isEmbeddedMessage()
public final boolean isEmbeddedMessage()
Gets a value indicating whether the attachment is an embedded message.
Returns: boolean
isUri()
public final boolean isUri()
Gets a value indicating whether attachment is URI-attachment.
Returns: boolean
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
save(OutputStream stream)
public void save(OutputStream stream)
Saves the specified stream.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| stream | java.io.OutputStream | The stream. |
save(String fileName)
public void save(String fileName)
Saves the specified file name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileName | java.lang.String | Name of the file. |
setContentId(String value)
public final void setContentId(String value)
Gets or sets the content id.
Value: The content id.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String |
setContentStream(InputStream value)
public final void setContentStream(InputStream value)
Gets or sets the content stream.
Value: The content stream.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.io.InputStream |
setContentType(ContentType value)
public final void setContentType(ContentType value)
Gets or sets the type of the content.
Value: The type of the content.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | ContentType |
setName(String value)
public final void setName(String value)
Gets or sets an attachment name
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String |
setNameEncoding(Charset value)
public final void setNameEncoding(Charset value)
Gets or sets an encoding of attachment name
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.nio.charset.Charset |
setPermissionType(int value)
public final void setPermissionType(int value)
Specifies the permission type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int |
setPreferredTextEncoding(Charset value)
public final void setPreferredTextEncoding(Charset value)
Gets or sets a preferred text encoding
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.nio.charset.Charset |
setProviderType(int value)
public final void setProviderType(int value)
Specifies the provider type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int |
setTransferEncoding(int value)
public final void setTransferEncoding(int value)
Gets or sets the transfer encoding.
Value: The transfer encoding.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int |
setUri(URI value)
public final void setUri(URI value)
Specifies the Url of the provider endpoint.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.net.URI |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |