public abstract class AttachmentBase extends Object implements com.aspose.email.ms.System.IDisposable
Base class for mail attachment.
Modifier | Constructor and Description |
---|---|
protected |
AttachmentBase(InputStream contentStream)
Initializes a new instance of the
AttachmentBase class. |
protected |
AttachmentBase(InputStream contentStream,
ContentType contentType)
Initializes a new instance of the
AttachmentBase class. |
protected |
AttachmentBase(InputStream contentStream,
String mediaType)
Initializes a new instance of the
AttachmentBase class. |
protected |
AttachmentBase(String fileName)
Initializes a new instance of the
AttachmentBase class. |
protected |
AttachmentBase(String fileName,
ContentType contentType)
Initializes a new instance of the
AttachmentBase class. |
protected |
AttachmentBase(String fileName,
String mediaType)
Initializes a new instance of the
AttachmentBase class. |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Performs application-defined tasks associated with freeing,
releasing, or resetting unmanaged resources.
|
protected void |
dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources.
|
String |
getContentId()
Gets or sets the content id.
|
InputStream |
getContentStream() |
ContentType |
getContentType()
Gets or sets the type of the content.
|
int |
getTransferEncoding()
Gets or sets the transfer encoding.
|
void |
save(OutputStream stream) |
void |
save(String fileName)
Saves the specified file name.
|
void |
saveRawContent(OutputStream stream)
Deprecated.
|
void |
setContentId(String value) |
void |
setContentStream(InputStream value) |
void |
setContentType(ContentType value) |
void |
setTransferEncoding(int value) |
protected AttachmentBase(String fileName)
Initializes a new instance of the AttachmentBase
class.
fileName
- Name of the file.protected AttachmentBase(String fileName, String mediaType)
Initializes a new instance of the AttachmentBase
class.
fileName
- Name of the file.mediaType
- Type of the media.protected AttachmentBase(String fileName, ContentType contentType)
Initializes a new instance of the AttachmentBase
class.
fileName
- Name of the file.contentType
- Type of the content.protected AttachmentBase(InputStream contentStream)
Initializes a new instance of the AttachmentBase
class.
contentStream
- The content stream.protected AttachmentBase(InputStream contentStream, String mediaType)
Initializes a new instance of the AttachmentBase
class.
contentStream
- The content stream.mediaType
- Type of the media.protected AttachmentBase(InputStream contentStream, ContentType contentType)
Initializes a new instance of the AttachmentBase
class.
contentStream
- The content stream.contentType
- Type of the content.public InputStream getContentStream()
public void setContentStream(InputStream value)
public String getContentId()
Gets or sets the content id.
Value: The content id.public void setContentId(String value)
public ContentType getContentType()
Gets or sets the type of the content.
Value: The type of the content.public void setContentType(ContentType value)
public int getTransferEncoding()
Gets or sets the transfer encoding.
Value: The transfer encoding.public void setTransferEncoding(int value)
@Deprecated public void saveRawContent(OutputStream stream)
public void save(OutputStream stream)
public void save(String fileName)
Saves the specified file name.
fileName
- Name of the file.public void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface com.aspose.email.ms.System.IDisposable
protected void dispose(boolean disposing)
Releases unmanaged and - optionally - managed resources.
disposing
- true
to release
both managed and unmanaged resources; false
to release only unmanaged resources.Copyright (c) 2008-2014 Aspose Pty Ltd. All Rights Reserved.