< prev index next >
src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java
Print this page
*** 60,70 ****
private final List<MIMEPart> partsList = new ArrayList<MIMEPart>();
private final Map<String, MIMEPart> partsMap = new HashMap<String, MIMEPart>();
/**
! * @see MIMEMessage(InputStream, String, MIMEConfig)
*/
public MIMEMessage(InputStream in, String boundary) {
this(in, boundary, new MIMEConfig());
}
--- 60,73 ----
private final List<MIMEPart> partsList = new ArrayList<MIMEPart>();
private final Map<String, MIMEPart> partsMap = new HashMap<String, MIMEPart>();
/**
! * @see #MIMEMessage(InputStream, String, MIMEConfig)
! *
! * @param in MIME message stream
! * @param boundary the separator for parts(pass it without --)
*/
public MIMEMessage(InputStream in, String boundary) {
this(in, boundary, new MIMEConfig());
}
*** 129,139 ****
* Creates a lazy attachment for a given Content-ID. It doesn't validate
* if the message contains an attachment with the given Content-ID. To
* do the validation, the message needs to be parsed. The parsing of the
* message is done lazily and is done while reading the bytes of the part.
*
! * @param contentId Content-ID of the part, expects Content-ID without <, >
* @return attachemnt part
*/
public MIMEPart getPart(String contentId) {
LOGGER.log(Level.FINE, "Content-ID={0}", contentId);
MIMEPart part = getDecodedCidPart(contentId);
--- 132,142 ----
* Creates a lazy attachment for a given Content-ID. It doesn't validate
* if the message contains an attachment with the given Content-ID. To
* do the validation, the message needs to be parsed. The parsing of the
* message is done lazily and is done while reading the bytes of the part.
*
! * @param contentId Content-ID of the part, expects Content-ID without {@code <, >}
* @return attachemnt part
*/
public MIMEPart getPart(String contentId) {
LOGGER.log(Level.FINE, "Content-ID={0}", contentId);
MIMEPart part = getDecodedCidPart(contentId);
*** 175,186 ****
}
/**
* Closes all parsed {@link com.sun.xml.internal.org.jvnet.mimepull.MIMEPart parts}.
* This method is safe to call even if parsing of message failed.
! * <p/>
! * Does not throw {@link com.sun.xml.internal.org.jvnet.mimepull.MIMEParsingException} if an
* error occurred during closing a MIME part. The exception (if any) is
* still logged.
*/
@Override
public void close() {
--- 178,189 ----
}
/**
* Closes all parsed {@link com.sun.xml.internal.org.jvnet.mimepull.MIMEPart parts}.
* This method is safe to call even if parsing of message failed.
! *
! * <p> Does not throw {@link com.sun.xml.internal.org.jvnet.mimepull.MIMEParsingException} if an
* error occurred during closing a MIME part. The exception (if any) is
* still logged.
*/
@Override
public void close() {
< prev index next >