So, I am trying to copy a file to a new location as follows:
FileReader in = new FileReader(strTempPath);
FileWriter out = new FileWriter(destTempPath);
int c;
while ((c = in.read()) != -1){
out.write(c);
}
in.close();
out.close();
Which works fine in 99% of cases. Sometimes, if the image is quite small, <= 60x80px, the copied image leaves all the distortions. Does anyone know what can happen here? Is this a copy function error here or should I look elsewhere?
Thank.
source
share