AttachmentBase

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.ms.System.IDisposable, java.io.Closeable

public abstract class AttachmentBase implements System.IDisposable, Closeable

Base class for mail attachment.

Methods

Method Description
getContentStream() Gets or sets the content stream.
setContentStream(InputStream value) Gets or sets the content stream.
getContentId() Gets or sets the content id.
setContentId(String value) Gets or sets the content id.
getHeaders() Gets headers collection of attachment.
getContentType() Gets or sets the type of the content.
setContentType(ContentType value) Gets or sets the type of the content.
getTransferEncoding() Gets or sets the transfer encoding.
setTransferEncoding(int value) Gets or sets the transfer encoding.
save(OutputStream stream) Saves the specified stream.
save(String fileName) Saves the specified file name.
dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
close()

getContentStream()

public final InputStream getContentStream()

Gets or sets the content stream.

Value: The content stream.

Returns: java.io.InputStream

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

getContentId()

public final String getContentId()

Gets or sets the content id.

Value: The content id.

Returns: java.lang.String

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

getHeaders()

public HeaderCollection getHeaders()

Gets headers collection of attachment.

Returns: HeaderCollection

getContentType()

public final ContentType getContentType()

Gets or sets the type of the content.

Value: The type of the content.

Returns: ContentType

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

getTransferEncoding()

public final int getTransferEncoding()

Gets or sets the transfer encoding.

Value: The transfer encoding.

Returns: 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

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.

dispose()

public final void dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

close()

public void close()