663664665666667668669670
try { setHeader("Content-Description", MimeUtility.fold(21, MimeUtility.encodeText(description, charset, null))); } catch (UnsupportedEncodingException uex) { throw new MessagingException("Encoding error", uex); } }
769770771772773774775
if (contentStream != null) return ((SharedInputStream)contentStream).newStream(0, -1); if (content != null) return new ByteArrayInputStream(content,start,contentLength); throw new MessagingException("No content"); }
984985986987988989990991
OutputStream wos = MimeUtility.encode(os, getEncoding()); getDataHandler().writeTo(wos); if(os!=wos) wos.flush(); // Needed to complete encoding }else { throw new MessagingException("no content"); } }
11681169117011711172117311741175
} setHeader("Content-Type", type); } } catch (IOException ex) { throw new MessagingException("IOException updating headers", ex); } }
160161162163164165166167
} prevline = line; } } while (line != null && line.length() > 0); } catch (IOException ioex) { throw new MessagingException("Error in input stream", ioex); } }
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