public class OutlookMessageAttachment extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
OutlookMessageAttachment.InputStreamCreator
Represents an
InputStream creator. |
static class |
OutlookMessageAttachment.MemoryInputStreamCreator
Wraps the creation of an
InputStream from a given source InputStream. |
| Constructor and Description |
|---|
OutlookMessageAttachment(String name,
String mimeType,
InputStream input)
Creates a new
OutlookMessageAttachment with the specified parameters. |
OutlookMessageAttachment(String name,
String mimeType,
OutlookMessageAttachment.InputStreamCreator creator)
Creates a new
OutlookMessageAttachment with the specified parameters. |
| Modifier and Type | Method and Description |
|---|---|
OutlookMessageAttachment.InputStreamCreator |
getInputStreamCreator()
Defines the
InputStreamCreator that handles the attachment content. |
String |
getMimeType()
Defines the MIME type of the attachment.
|
String |
getName()
Returns the name of the attachment, as seen by the user.
|
InputStream |
getNewInputStream()
Returns a new
InputStream to read the content of this attachment. |
void |
setInputStreamCreator(OutlookMessageAttachment.InputStreamCreator is) |
void |
setMimeType(String mimeType) |
public OutlookMessageAttachment(String name, String mimeType, OutlookMessageAttachment.InputStreamCreator creator)
OutlookMessageAttachment with the specified parameters.name - The attachment's name.mimeType - The MIME type of the attachment.creator - The InputStreamCreator or null.public OutlookMessageAttachment(String name, String mimeType, InputStream input)
OutlookMessageAttachment with the specified parameters.
A new MemoryInputStreamCreator will be created with the specified input
as source.name - The attachment's name.mimeType - The MIME type of the attachment.input - The input or null.OutlookMessageAttachment.MemoryInputStreamCreatorpublic final String getName()
public String getMimeType()
public void setMimeType(String mimeType)
public OutlookMessageAttachment.InputStreamCreator getInputStreamCreator()
InputStreamCreator that handles the attachment content.
This value may be null.public void setInputStreamCreator(OutlookMessageAttachment.InputStreamCreator is)
public InputStream getNewInputStream() throws IOException
InputStream to read the content of this attachment.InputStream.IOException - If an I/O error occurs.OutlookMessageAttachment.InputStreamCreator.newInputStream(ch.astorm.jotlmsg.OutlookMessageAttachment)Copyright © 2019. All rights reserved.