mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Merge PR-1983 with master (#1983)
This commit is contained in:
parent
fb3055e716
commit
2d6160c843
1 changed files with 8 additions and 3 deletions
|
|
@ -112,9 +112,9 @@ public class ContributionUtils {
|
||||||
out = new FileOutputStream(new File(destinationFilename));
|
out = new FileOutputStream(new File(destinationFilename));
|
||||||
|
|
||||||
byte[] buf = new byte[1024];
|
byte[] buf = new byte[1024];
|
||||||
int len;
|
int length;
|
||||||
while ((len=in.read(buf)) > 0) {
|
while ((length = in.read(buf)) > 0) {
|
||||||
out.write(buf, 0, len);
|
out.write(buf, 0, length);
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
@ -123,6 +123,11 @@ public class ContributionUtils {
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
if (out != null) out.close();
|
if (out != null) out.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if (in != null) in.close();
|
if (in != null) in.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue