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

ConstructorDescription
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

MethodDescription
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.
isTnef()Gets a value indicating whether the attachment is TNEF formatted 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:

ParameterTypeDescription
urijava.net.URIUrl

ReferenceAttachment(String uri)

public ReferenceAttachment(String uri)

Initializes a new instance of ReferenceAttachment.

Parameters:

ParameterTypeDescription
urijava.lang.Stringstring Url

close()

public void close()

createAttachmentFromString(String content, ContentType contentType)

public static Attachment createAttachmentFromString(String content, ContentType contentType)

Creates the attachment from string.

Parameters:

ParameterTypeDescription
contentjava.lang.StringA string that represents the content of attachment.
contentTypeContentTypeThe 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:

ParameterTypeDescription
contentjava.lang.StringA string that represents the content of attachment.
namejava.lang.StringThe 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:

ParameterTypeDescription
contentjava.lang.StringA string that represents the content of attachment.
namejava.lang.StringThe attachment name.
contentEncodingjava.nio.charset.CharsetThe content encoding.
mediaTypejava.lang.StringThe 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:

ParameterTypeDescription
arg0java.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

isTnef()

public final boolean isTnef()

Gets a value indicating whether the attachment is TNEF formatted 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:

ParameterTypeDescription
streamjava.io.OutputStreamThe stream.

save(String fileName)

public void save(String fileName)

Saves the specified file name.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringName of the file.

setContentId(String value)

public final void setContentId(String value)

Gets or sets the content id.

Value: The content id.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setContentStream(InputStream value)

public final void setContentStream(InputStream value)

Gets or sets the content stream.

Value: The content stream.

Parameters:

ParameterTypeDescription
valuejava.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:

ParameterTypeDescription
valueContentType

setName(String value)

public final void setName(String value)

Gets or sets an attachment name

Parameters:

ParameterTypeDescription
valuejava.lang.String

setNameEncoding(Charset value)

public final void setNameEncoding(Charset value)

Gets or sets an encoding of attachment name

Parameters:

ParameterTypeDescription
valuejava.nio.charset.Charset

setPermissionType(int value)

public final void setPermissionType(int value)

Specifies the permission type.

Parameters:

ParameterTypeDescription
valueint

setPreferredTextEncoding(Charset value)

public final void setPreferredTextEncoding(Charset value)

Gets or sets a preferred text encoding

Parameters:

ParameterTypeDescription
valuejava.nio.charset.Charset

setProviderType(int value)

public final void setProviderType(int value)

Specifies the provider type.

Parameters:

ParameterTypeDescription
valueint

setTransferEncoding(int value)

public final void setTransferEncoding(int value)

Gets or sets the transfer encoding.

Value: The transfer encoding.

Parameters:

ParameterTypeDescription
valueint

setUri(URI value)

public final void setUri(URI value)

Specifies the Url of the provider endpoint.

Parameters:

ParameterTypeDescription
valuejava.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:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int