Re: Create a word document with the data present in uploaded file from !_NEWLINE_!jsp page
Posted By:
Ravi_Verelly
Posted On:
Monday, April 23, 2001 01:01 PM
When you read the data from source.doc file read byte by byte and write the same to dest.doc.
Ex:
InputStream fi = new FileInputStream(source.doc);
int c = fi.available();
byte buf[] = new byte[c];
for (int i=0; i
buf[i]=(byte) fi.read();
}
fi.close();
OutputStream fo = new FileOutputStream(dest.doc);
fo.write(buf);
fo.flush();
fo.close();