Use the given InputStream to build the TemporyFileBinaryBodyparamis the InputStream to use as sourcethrowsIOException TempPath tempPath = TempStorage.getInstance().getRootTempPath(); ByteArrayOutputStream out = new ByteArrayOutputStream(); IOUtils.copy(is, out); out.close(); tempFile = out.toByteArray();
TempPath tempPath = TempStorage.getInstance().getRootTempPath(); ByteArrayOutputStream out = new ByteArrayOutputStream(); IOUtils.copy(is, out); out.close(); tempFile = out.toByteArray();
seeorg.apache.james.mime4j.message.BinaryBody#getInputStream() return new ByteArrayInputStream(tempFile);
return new ByteArrayInputStream(tempFile);
seeorg.apache.james.mime4j.message.AbstractBody#getParent() return parent;
return parent;
seeorg.apache.james.mime4j.message.AbstractBody#setParent(org.apache.james.mime4j.message.Entity) this.parent = parent;
this.parent = parent;
seeorg.apache.james.mime4j.message.Body#writeTo(java.io.OutputStream) IOUtils.copy(getInputStream(),out);
IOUtils.copy(getInputStream(),out);