Thanks Oliver ..it worked ..:) .... I had written this method for
writing a single file...
and it worked well in that case,,,,
> > The code of fileManager.fileWriter is here:
> > public void fileWriter(StringBuffer stringBuffer,String path)
[quoted text clipped - 15 lines]
>
> - Oliver
>> The code of fileManager.fileWriter is here:
>> public void fileWriter(StringBuffer stringBuffer,String path)
[quoted text clipped - 3 lines]
>> File writeFile = new File(path);
>> OutputStream fout = new FileOutputStream(writeFile);
try {
>> OutputStream bout = new BufferedOutputStream(fout);
Single write => buffer probably not useful. ^
>> OutputStreamWriter writer = new OutputStreamWriter(bout);
^^^^^^^^^^^^^^^^^^ Just Writer would be better.
>> writer.write(stringBuffer.toString());
writer.flush();
} finally {
fout.close();
}
>> }
>> }
[quoted text clipped - 3 lines]
>
> You have to close the output streams when finished writing.
More than that, you should always close resources, even if you get an
exception.
Tom Hawtin