public class MimeMessageInputStreamSource extends MimeMessageSource implements Disposable
DeferredFileOutputStream with its threshold set to 100kb| Constructor and Description |
|---|
MimeMessageInputStreamSource(String key) |
MimeMessageInputStreamSource(String key,
InputStream in)
Construct a new MimeMessageInputStreamSource from an
InputStream that contains the bytes of a MimeMessage. |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Dispose the object
|
InputStream |
getInputStream()
Get an input stream to retrieve the data stored in the temporary file
|
long |
getMessageSize()
Get the size of the temp file
|
String |
getSourceId()
Returns the unique identifier of this input stream source
|
OutputStream |
getWritableOutputStream() |
public MimeMessageInputStreamSource(String key, InputStream in) throws javax.mail.MessagingException
InputStream that contains the bytes of a MimeMessage.key - the prefix for the name of the temp filein - the stream containing the MimeMessagejavax.mail.MessagingException - if an error occurs while trying to store the streampublic MimeMessageInputStreamSource(String key) throws javax.mail.MessagingException
javax.mail.MessagingExceptionpublic String getSourceId()
getSourceId in class MimeMessageSourcepublic InputStream getInputStream() throws IOException
getInputStream in class MimeMessageSourceBufferedInputStream containing the dataIOException - if an error occurs while generating the InputStreampublic long getMessageSize()
throws IOException
getMessageSize in class MimeMessageSourceIOException - if an error is encoutered while computing the size of the
messagepublic OutputStream getWritableOutputStream() throws FileNotFoundException
FileNotFoundExceptionpublic void dispose()
Disposabledispose in interface DisposableDisposable.dispose()Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.