public class Attachment extends AttachmentBase implements IPreferredTextEncodingProvider, IAttachment
Constructor and Description |
---|
Attachment(InputStream contentStream,
ContentType contentType) |
Attachment(InputStream contentStream,
String name) |
Attachment(InputStream contentStream,
String name,
String mediaType) |
Attachment(String fileName) |
Attachment(String fileName,
ContentType contentType) |
Attachment(String fileName,
String mediaType) |
Modifier and Type | Method and Description |
---|---|
static Attachment |
createAttachmentFromString(String content,
ContentType contentType) |
static Attachment |
createAttachmentFromString(String content,
String name) |
static Attachment |
createAttachmentFromString(String content,
String name,
Charset contentEncoding,
String mediaType) |
ContentDisposition |
getContentDisposition()
Gets Content-Disposition header
|
String |
getName()
Gets or sets an attachment name
|
Charset |
getNameEncoding() |
Charset |
getPreferredTextEncoding() |
void |
setName(String value) |
void |
setNameEncoding(Charset value) |
void |
setPreferredTextEncoding(Charset value) |
dispose, getContentId, getContentStream, getContentType, getTransferEncoding, save, save, saveRawContent, setContentId, setContentStream, setContentType, setTransferEncoding
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
save, save
public Attachment(String fileName)
public Attachment(String fileName, ContentType contentType)
public Attachment(InputStream contentStream, String name)
public Attachment(InputStream contentStream, String name, String mediaType)
public Attachment(InputStream contentStream, ContentType contentType)
public String getName()
Gets or sets an attachment name
getName
in interface IAttachment
public void setName(String value)
setName
in interface IAttachment
public Charset getNameEncoding()
public void setNameEncoding(Charset value)
public ContentDisposition getContentDisposition()
Gets Content-Disposition header
public Charset getPreferredTextEncoding()
getPreferredTextEncoding
in interface IPreferredTextEncodingProvider
public void setPreferredTextEncoding(Charset value)
setPreferredTextEncoding
in interface IPreferredTextEncodingProvider
public static Attachment createAttachmentFromString(String content, String name)
public static Attachment createAttachmentFromString(String content, String name, Charset contentEncoding, String mediaType)
public static Attachment createAttachmentFromString(String content, ContentType contentType)
Copyright (c) 2008-2013 Aspose Pty Ltd. All Rights Reserved.