644645646647648649650651
try { setHeader("Content-Description", MimeUtility.fold(21, MimeUtility.encodeText(description, charset, null))); } catch (UnsupportedEncodingException uex) { throw new MessagingException("Encoding error", uex); } }
750751752753754755756
if (contentStream != null) return ((SharedInputStream)contentStream).newStream(0, -1); if (content != null) return new ByteArrayInputStream(content,start,contentLength); throw new MessagingException("No content"); }
965966967968969970971972
OutputStream wos = MimeUtility.encode(os, getEncoding()); getDataHandler().writeTo(wos); if(os!=wos) wos.flush(); // Needed to complete encoding }else { throw new MessagingException("no content"); } }
11451146114711481149115011511152
} setHeader("Content-Type", type); } } catch (IOException ex) { throw new MessagingException("IOException updating headers", ex); } }
145146147148149150151152
} prevline = line; } } while (line != null && line.length() > 0); } catch (IOException ioex) { throw new MessagingException("Error in input stream", ioex); } }
6263646566676869707172
boundary = contType.getParameter("boundary"); } public MIMEPart readAndReturnSOAPPart() throws MessagingException { if (soapPart != null) { throw new MessagingException("Inputstream from datasource was already consumed"); } readSOAPPart(); return soapPart; }
9091929394959697
startParam = st; soapPart = mm.getPart(startParam); } } catch (IOException ex) { throw new MessagingException("No inputstream from datasource", ex); } }
307308309310311312313
else if (encoding.equalsIgnoreCase("binary") || encoding.equalsIgnoreCase("7bit") || encoding.equalsIgnoreCase("8bit")) return is; else throw new MessagingException("Unknown encoding: " + encoding); }
338339340341342343344
else if (encoding.equalsIgnoreCase("binary") || encoding.equalsIgnoreCase("7bit") || encoding.equalsIgnoreCase("8bit")) return os; else throw new MessagingException("Unknown encoding: " +encoding); }
375376377378379380381