public MimeMultipartParser(InputStream in, String cType, StreamingAttachmentFeature feature) { this.contentType = new ContentTypeImpl(cType); // ContentType ct = new ContentType(cType); // String boundary = ct.getParameter("boundary"); String boundary = contentType.getBoundary(); if (boundary == null || boundary.equals("")) { throw new WebServiceException("MIME boundary parameter not found" + contentType); } message = (feature != null) ? new MIMEMessage(in, boundary, feature.getConfig()) : new MIMEMessage(in, boundary); // Strip <...> from root part's Content-ID // String st = ct.getParameter("start"); String st = contentType.getRootId(); if (st != null && st.length() > 2 && st.charAt(0) == '<' && st.charAt(st.length()-1) == '>') { st = st.substring(1, st.length()-1); } start = st; }
wsFeatures.add(new StreamingAttachmentFeature());
public MimeMultipartParser(InputStream in, String cType, StreamingAttachmentFeature feature) { this.contentType = new ContentTypeImpl(cType); // ContentType ct = new ContentType(cType); // String boundary = ct.getParameter("boundary"); String boundary = contentType.getBoundary(); if (boundary == null || boundary.equals("")) { throw new WebServiceException("MIME boundary parameter not found" + contentType); } message = (feature != null) ? new MIMEMessage(in, boundary, feature.getConfig()) : new MIMEMessage(in, boundary); // Strip <...> from root part's Content-ID // String st = ct.getParameter("start"); String st = contentType.getRootId(); if (st != null && st.length() > 2 && st.charAt(0) == '<' && st.charAt(st.length()-1) == '>') { st = st.substring(1, st.length()-1); } start = st; }
public MimeMultipartParser(InputStream in, String cType, StreamingAttachmentFeature feature) { this.contentType = new ContentTypeImpl(cType); // ContentType ct = new ContentType(cType); // String boundary = ct.getParameter("boundary"); String boundary = contentType.getBoundary(); if (boundary == null || boundary.equals("")) { throw new WebServiceException("MIME boundary parameter not found" + contentType); } message = (feature != null) ? new MIMEMessage(in, boundary, feature.getConfig()) : new MIMEMessage(in, boundary); // Strip <...> from root part's Content-ID // String st = ct.getParameter("start"); String st = contentType.getRootId(); if (st != null && st.length() > 2 && st.charAt(0) == '<' && st.charAt(st.length()-1) == '>') { st = st.substring(1, st.length()-1); } start = st; }