Methods Summary |
---|
public java.io.InputStream | getInputStream()
try {
return new BinaryTempFileBodyInputStream(new FileInputStream(mFile));
}
catch (IOException ioe) {
throw new MessagingException("Unable to open body", ioe);
}
|
public java.io.OutputStream | getOutputStream()
mFile = File.createTempFile("body", null, mTempDirectory);
mFile.deleteOnExit();
return new FileOutputStream(mFile);
|
public static void | setTempDirectory(java.io.File tempDirectory)
mTempDirectory = tempDirectory;
|
public void | writeTo(java.io.OutputStream out)
InputStream in = getInputStream();
Base64OutputStream base64Out = new Base64OutputStream(out);
IOUtils.copy(in, base64Out);
base64Out.close();
mFile.delete();
|