public class BufferedAttachment extends Attachment
Constructor and Description |
---|
BufferedAttachment(String name,
String mimeType,
byte[] byteArray,
boolean asAlternative)
Generates a new attachment with the given name, mime type and contents.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream() |
addHeader, getContentType, getHeaders, getName, getOutputStream, isAlternative, withContentType
public BufferedAttachment(String name, String mimeType, byte[] byteArray, boolean asAlternative)
name
- the name of the attached filemimeType
- the mime type of the file. Use MimeHelper
to determine it at
runtime if it is not know in advancebyteArray
- the contents of the templateasAlternative
- determines if this attachment is an alternative to the text content of the mail
(true) or a real attachment (false)public InputStream getInputStream() throws IOException
IOException
Copyright © 2018. All rights reserved.