try {
ret = rawContent.getInputStream();
return ASCIIUtility.getBytes(ret);
} catch (Exception e) {
log.log(Level.SEVERE,"SAAJ0577.soap.attachment.getrawcontent.exception", e);
throw new SOAPExceptionImpl(e.getLocalizedMessage());
}
} else if (dataHandler != null) {
try {
ret = dataHandler.getInputStream();
return ASCIIUtility.getBytes(ret);
} catch (IOException e) {
log.severe("SAAJ0574.soap.attachment.datahandler.ioexception");
throw new SOAPExceptionImpl("DataHandler error" + e);
}
} else {
log.severe("SAAJ0572.soap.no.content.for.attachment");
throw new SOAPExceptionImpl("No data handler/content associated with this attachment");
}
}