//TODO: reading the entire attachment here is ineffcient. Somehow the MimeBodyPart
// Ctor with inputStream causes problems based on whether the InputStream has
// markSupported()==true or false
bos = new ByteOutputStream();
bos.write(content);
rawContent = new MimeBodyPart(hdrs, bos.getBytes(), bos.getCount());
setMimeHeader("Content-Type", contentType);
} catch (Exception e) {
log.log(Level.SEVERE, "SAAJ0576.soap.attachment.setrawcontent.exception", e);
throw new SOAPExceptionImpl(e.getLocalizedMessage());
} finally {