So basically I have:
FileOutputStream fos = new FileOutputStream(dir + "/" + name);
fos.write(bImg);
fos.close();
Now here sometimes bImg
could contains more than 5MB
which I happen to get performance problem. So I might need to write part to part of the string to the file. Something like writing 5000 chars to the file first then got to next 5000 chars and so on. But I don't really know how to do that.
Tried:
String file = dir + "/" + name;
FileOutputStream fos = new FileOutputStream(new File(file));
BufferedOutputStream buffOut=new BufferedOutputStream(fos);
buffOut.write(bImg);
buffOut.flush();
buffOut.close();
But no luck still having same problem