| |
|
| java.lang.Object org.apache.james.core.MimeMessageSource org.apache.james.core.MimeMessageInputStreamSource
MimeMessageInputStreamSource | public class MimeMessageInputStreamSource extends MimeMessageSource implements Disposable(Code) | | 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.
See Also: MimeMessageWrapper |
file | File file(Code) | | A temporary file used to hold the message stream
|
sourceId | String sourceId(Code) | | The full path of the temporary file
|
MimeMessageInputStreamSource | public MimeMessageInputStreamSource(String key, InputStream in) throws MessagingException(Code) | | Construct a new MimeMessageInputStreamSource from an
InputStream that contains the bytes of a
MimeMessage.
Parameters: key - the prefix for the name of the temp file Parameters: in - the stream containing the MimeMessage throws: MessagingException - if an error occurs while trying to storethe stream |
dispose | public void dispose()(Code) | | See Also: org.apache.avalon.framework.activity.Disposable.dispose |
getInputStream | public synchronized InputStream getInputStream() throws IOException(Code) | | Get an input stream to retrieve the data stored in the temporary file
a BufferedInputStream containing the data |
getMessageSize | public long getMessageSize() throws IOException(Code) | | Get the size of the temp file
the size of the temp file throws: IOException - if an error is encoutered while computing the size of the message |
getSourceId | public String getSourceId()(Code) | | Returns the unique identifier of this input stream source
the unique identifier for this MimeMessageInputStreamSource |
|
|
|