生成附件的数据流不保存在本地硬盘而是直接放入附件发送,这如何实现?
解决方案 »
- 调用类的get方法报空指针异常
- JSP加载慢,页面有大量的JS,HQL查询语句换为SQL查询不存在慢。
- java如何打开.dbf的文件,把它的内容读到其他数据库
- 请教详细设计方案用什么工具来表现
- 请教ServletContext的几个问题。
- java读PPT 怎么改成读URL的路径,
- <<<<你有这样的困扰吗?----软件学员找工作需要项目经验.
- tomcat4.0 和其他版本的问题吗
- 求教接到一个WSDL后改如何进行开发?
- 大家说说在linux下和在windows开发java(j2ee)哪个更流行、更好?
- JSP 点击弹出打开保存对话框~~~
- HIBERNATE调用有两个返回值的oracle存储过程怎么做
private String content; /**
*
*/
public MailSource(String content) {
this.content = content;
} /*
* (non-Javadoc)
*
* @see org.springframework.core.io.InputStreamSource#getInputStream()
*/
public InputStream getInputStream() throws IOException {
// ByteArrayOutputStream bo = new ByteArrayOutputStream();
// bo.write(content.getBytes());
// bo.flush();
// ByteArrayInputStream bi = new
// ByteArrayInputStream(bo.toByteArray());
// bo.close();
// System.out.println("Return byte array inputstream");
return new ByteArrayInputStream(content.getBytes());
} }