hi,
I had the same problem with files time ago. I solved it using InputStream ,
BufferedInputStream and flushing. For instance:
| FileOutputStream fw = ...whatever...
| String filename = ...whatever...
| InputStream in = null;
| int bytesRead;
| try {
| in = new BufferedInputStream(new FileInputStream(filename));
| byte[] buf = new byte[4 * 1024]; // 4K buffer
| while ((bytesRead = in.read(buf)) != -1) {
| out.write(buf, 0, bytesRead);
| out.flush();
| }
| if (in != null)
| in.close();
| } catch (Throwable tt) {
| tt.printStackTrace();
| }
|
Hope it helps you!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120749#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...