/* (non-Javadoc)
* @see org.directwebremoting.extend.DownloadManager#addFile(org.directwebremoting.extend.DownloadManager.FileGenerator)
*/
public String addFileTransfer(FileTransfer transfer) throws IOException
{
OutputStreamLoader loader = null;
ByteArrayOutputStream out = null;
try
{
out = new ByteArrayOutputStream();
String mimeType = transfer.getMimeType();
loader = transfer.getOutputStreamLoader();
loader.load(out);
String base64data = new String(Base64.encodeBase64(out.toByteArray()));
return "'data:" + mimeType + ";base64," + base64data + "'";
}
finally
{