public abstract class MultipartIterator
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Class and Description |
---|---|
protected class |
MultipartIterator.KeyedByContentId |
Modifier and Type | Field and Description |
---|---|
protected javax.activation.DataSource |
dataSource |
protected static IdGenerator |
idGenerator |
protected org.slf4j.Logger |
log |
Modifier | Constructor and Description |
---|---|
|
MultipartIterator(byte[] bytes)
Constructor.
|
protected |
MultipartIterator(javax.activation.DataSource ds)
Constructor.
|
|
MultipartIterator(java.io.InputStream in)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType()
Convenience Method to get the content-Type
|
javax.mail.internet.InternetHeaders |
getHeaders() |
java.lang.String |
getMessageID()
Convenience Method to get the Message-ID from the underlying datasource.
|
protected abstract void |
initIterator() |
void |
remove()
Throws a
UnsupportedOperationException to add default behaviour in java 7 cases. |
protected transient org.slf4j.Logger log
protected javax.activation.DataSource dataSource
protected static final IdGenerator idGenerator
public MultipartIterator(java.io.InputStream in) throws java.io.IOException, javax.mail.MessagingException
in
- the Inputstream from which to parse the mime multi-partjavax.mail.MessagingException
- if the bytes did not contain a valid MimeMultiPartjava.io.IOException
- if there was an IOExceptionjavax.mail.MessagingException
- if an underlying javax.mail exception occurredpublic MultipartIterator(byte[] bytes) throws java.io.IOException, javax.mail.MessagingException
bytes
- the byte array where the mime multi-part is.javax.mail.MessagingException
- if the bytes did not contain a valid MimeMultiPartjava.io.IOException
- if there was an IOExceptionjavax.mail.MessagingException
- if the bytes did not contain a valid MimeMultiPartprotected MultipartIterator(javax.activation.DataSource ds) throws java.io.IOException, javax.mail.MessagingException
ds
- the Datasource from which to parse the mime multipart.javax.mail.MessagingException
- if the bytes did not contain a valid MimeMultiPartjava.io.IOException
- if there was an IOExceptionpublic void remove()
UnsupportedOperationException
to add default behaviour in java 7 cases.public java.lang.String getContentType()
public java.lang.String getMessageID()
public javax.mail.internet.InternetHeaders getHeaders()
protected abstract void initIterator() throws javax.mail.MessagingException, java.io.IOException
javax.mail.MessagingException
java.io.IOException