Not working
present code
FileOutputStream fos = new FileOutputStream"somename"
byte[] buf = new byte[256];
int read = 0;
while ((read = is.read(buf)) >= 0) {
fos.write(buf, 0, read);
}
fos.close();
System.out.println("File Size "+ file.length());===> 0 size
Main Topics
Browse All Topics





by: CEHJPosted on 2008-07-04 at 00:59:06ID: 21931587
That should be
while ((read = is.read(buf)) >= 0) {
and it won't be possible to check the length until the FOS is closed