/** * Method getContent * * @param datasource * @return * @throws IOException */ public Object getContent(DataSource datasource) throws IOException { InputStream is = datasource.getInputStream(); ByteArrayOutputStream os = new ByteArrayOutputStream(); int count; byte[] buffer = new byte[1000]; try { while ((count = is.read(buffer, 0, buffer.length)) > 0) { os.write(buffer, 0, count); } } finally { is.close(); } try { return os.toString(getCharSet(datasource.getContentType())); } catch (ParseException e) { throw new UnsupportedEncodingException(e.getMessage()); } }
throw new IOException("Error parsing sender address: " + pe.getMessage());
Messages.getMessage("mimeErrorParsing", e.getMessage())); } catch (java.io.IOException e) { throw new org.apache.axis.AxisFault(
Messages.getMessage("mimeErrorParsing", e.getMessage())); } catch (java.io.IOException e) { throw new org.apache.axis.AxisFault(
Messages.getMessage("mimeErrorParsing", e.getMessage())); } catch (java.io.IOException e) { throw new org.apache.axis.AxisFault(