7778798081828384858687
boundary = contType.getParameter("boundary"); } public MIMEPart readAndReturnSOAPPart() throws MessagingException { if (soapPart != null) { throw new MessagingException("Inputstream from datasource was already consumed"); } readSOAPPart(); return soapPart; }
105106107108109110111112
startParam = st; soapPart = mm.getPart(startParam); } } catch (IOException ex) { throw new MessagingException("No inputstream from datasource", ex); } }
323324325326327328329
else if (encoding.equalsIgnoreCase("binary") || encoding.equalsIgnoreCase("7bit") || encoding.equalsIgnoreCase("8bit")) return is; else throw new MessagingException("Unknown encoding: " + encoding); }
354355356357358359360
else if (encoding.equalsIgnoreCase("binary") || encoding.equalsIgnoreCase("7bit") || encoding.equalsIgnoreCase("8bit")) return os; else throw new MessagingException("Unknown encoding: " +encoding); }
391392393394395396397
212213214215216217218219220221
ByteOutputStream bos = new ByteOutputStream(); bos.write(is); content = bos.getBytes(); contentLength = bos.getCount(); } catch (IOException ioex) { throw new MessagingException("Error reading input stream", ioex); } } }
659660661662663664665666
try { setHeader("Content-Description", MimeUtility.fold(21, MimeUtility.encodeText(description, charset, null))); } catch (UnsupportedEncodingException uex) { throw new MessagingException("Encoding error", uex); } }
765766767768769770771
if (contentStream != null) return ((SharedInputStream)contentStream).newStream(0, -1); if (content != null) return new ByteArrayInputStream(content,start,contentLength); throw new MessagingException("No content"); }
980981982983984985986987
OutputStream wos = MimeUtility.encode(os, getEncoding()); getDataHandler().writeTo(wos); if(os!=wos) wos.flush(); // Needed to complete encoding }else { throw new MessagingException("no content"); } }
11601161116211631164116511661167
} setHeader("Content-Type", type); } } catch (IOException ex) { throw new MessagingException("IOException updating headers", ex); } }