public class MIMEMessage extends Object
Constructor and Description |
---|
MIMEMessage(InputStream in,
String boundary) |
MIMEMessage(InputStream in,
String boundary,
MIMEConfig config)
Creates a MIME message from the content's stream.
|
Modifier and Type | Method and Description |
---|---|
List<MIMEPart> |
getAttachments()
Gets all the attachments by parsing the entire MIME message.
|
MIMEPart |
getPart(int index)
Creates nth attachment lazily.
|
MIMEPart |
getPart(String contentId)
Creates a lazy attachment for a given Content-ID.
|
boolean |
makeProgress()
Parses the MIME message in a pull fashion.
|
void |
parseAll()
Parses the whole MIME message eagerly
|
public MIMEMessage(InputStream in, String boundary)
public MIMEMessage(InputStream in, String boundary, MIMEConfig config)
in
- MIME message streamboundary
- the separator for parts(pass it without --)config
- various configuration parameterspublic List<MIMEPart> getAttachments()
public MIMEPart getPart(int index)
index
- sequential order of the part. starts with zero.public MIMEPart getPart(String contentId)
contentId
- Content-ID of the part, expects Content-ID without <, >public void parseAll()
public boolean makeProgress()
Copyright © 2012 Oracle Corporation. All Rights Reserved.