|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.core.MimeMessageSource
org.apache.james.core.MimeMessageInputStreamSource
Takes an input stream and creates a repeatable input stream source for a MimeMessageWrapper. It does this by completely reading the input stream and saving that to a temporary file that should delete on exit, or when this object is GC'd.
MimeMessageWrapper
Constructor Summary | |
MimeMessageInputStreamSource(String key,
InputStream in)
Construct a new MimeMessageInputStreamSource from an InputStream that contains the bytes of a
MimeMessage. |
Method Summary | |
void |
dispose()
|
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MimeMessageInputStreamSource(String key, InputStream in) throws MessagingException
InputStream
that contains the bytes of a
MimeMessage.
key
- the prefix for the name of the temp filein
- the stream containing the MimeMessage
MessagingException
- if an error occurs while trying to store
the streamMethod Detail |
public String getSourceId()
getSourceId
in class MimeMessageSource
public InputStream getInputStream() throws IOException
getInputStream
in class MimeMessageSource
BufferedInputStream
containing the data
IOException
- if an error occurs while generating the
InputStreampublic long getMessageSize() throws IOException
getMessageSize
in class MimeMessageSource
IOException
- if an error is encoutered while computing the size of the messagepublic void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
Disposable.dispose()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |