Package com.sun.xml.ws.encoding
Class MimeMultipartParser
java.lang.Object
com.sun.xml.ws.encoding.MimeMultipartParser
Parses Mime multipart message into primary part and attachment parts. It
parses the stream lazily as and when required.
- Author:
- Vivek Pandey, Jitendra Kotamraju
-
Constructor Summary
ConstructorsConstructorDescriptionMimeMultipartParser(InputStream in, String cType, StreamingAttachmentFeature feature) -
Method Summary
Modifier and TypeMethodDescriptiongetAttachmentPart(String contentId) This method can be called to get a matching MIME attachment part for the given contentId.Parses the entire stream and returns all MIME parts except root MIME part.Parses the stream and returns the root part.
-
Constructor Details
-
MimeMultipartParser
-
-
Method Details
-
getRootPart
Parses the stream and returns the root part. If start parameter is present in Content-Type, it is used to determine the root part, otherwise root part is the first part.- Returns:
- StreamAttachment for root part null if root part cannot be found
-
getAttachmentParts
Parses the entire stream and returns all MIME parts except root MIME part.- Returns:
- Map<String, StreamAttachment> for all attachment parts
-
getAttachmentPart
This method can be called to get a matching MIME attachment part for the given contentId. It parses the stream until it finds a matching part.- Returns:
- StreamAttachment attachment for contentId null if there is no attachment for contentId
- Throws:
IOException
-
getContentType
-