62,614
社区成员
发帖
与我相关
我的任务
分享
public static void write() throws Exception
{
ByteArrayInputStream bs = new ByteArrayInputStream(new String("hello world 你好 中国").getBytes());
POIFSFileSystem fs = new POIFSFileSystem();
fs.getRoot().createDocument("WordDocument", bs);
FileOutputStream fos = new FileOutputStream("e:\\Will.doc");
fs.writeFilesystem(fos);
fos.flush();
fos.close();
bs.close();
}