< prev index next >

jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java

Print this page

        

*** 29,48 **** package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; ! import java.io.*; ! ! import javax.activation.DataSource; ! ! import com.sun.xml.internal.messaging.saaj.packaging.mime.*; ! import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*; ! import com.sun.xml.internal.messaging.saaj.util.FinalArrayList; import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; /** * The MimeMultipart class is an implementation * that uses MIME conventions for the multipart data. <p> * * A MimeMultipart is obtained from a MimeBodyPart whose primary type --- 29,54 ---- package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; ! import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; ! import com.sun.xml.internal.messaging.saaj.packaging.mime.MultipartDataSource; ! import com.sun.xml.internal.messaging.saaj.packaging.mime.util.ASCIIUtility; ! import com.sun.xml.internal.messaging.saaj.packaging.mime.util.LineInputStream; ! import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil; import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; + import com.sun.xml.internal.messaging.saaj.util.FinalArrayList; import com.sun.xml.internal.messaging.saaj.util.SAAJUtil; + import javax.activation.DataSource; + import java.io.BufferedInputStream; + import java.io.ByteArrayInputStream; + import java.io.IOException; + import java.io.InputStream; + import java.io.OutputStream; + /** * The MimeMultipart class is an implementation * that uses MIME conventions for the multipart data. <p> * * A MimeMultipart is obtained from a MimeBodyPart whose primary type
*** 324,334 **** in = new BufferedInputStream(in); } catch (Exception ex) { throw new MessagingException("No inputstream from datasource"); } if (in instanceof SharedInputStream) ! sin = (SharedInputStream)in; String boundary = "--" + contentType.getParameter("boundary"); byte[] bndbytes = ASCIIUtility.getBytes(boundary); int bl = bndbytes.length; --- 330,340 ---- in = new BufferedInputStream(in); } catch (Exception ex) { throw new MessagingException("No inputstream from datasource"); } if (in instanceof SharedInputStream) ! sin = (SharedInputStream) in; String boundary = "--" + contentType.getParameter("boundary"); byte[] bndbytes = ASCIIUtility.getBytes(boundary); int bl = bndbytes.length;
*** 395,405 **** int eol1 = -1, eol2 = -1; /* * Read and save the content bytes in buf. */ ! for (;;) { if (bol) { /* * At the beginning of a line, check whether the * next line is a boundary. */ --- 401,411 ---- int eol1 = -1, eol2 = -1; /* * Read and save the content bytes in buf. */ ! for (; ; ) { if (bol) { /* * At the beginning of a line, check whether the * next line is a boundary. */
*** 489,499 **** } finally { if (buf != null) buf.close(); } ! if (!ignoreMissingEndBoundary && !foundClosingBoundary && sin== null) { throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers"); } parsed = true; } --- 495,505 ---- } finally { if (buf != null) buf.close(); } ! if (!ignoreMissingEndBoundary && !foundClosingBoundary && sin == null) { throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers"); } parsed = true; }
< prev index next >