Skip to content

Commit

Permalink
close FileOutputStream
Browse files Browse the repository at this point in the history
  • Loading branch information
geektortoise committed Jun 11, 2018
1 parent 7c5d094 commit 1bc88b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/be/cytomine/client/HttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ public int get(String url, String dest) throws IOException {
}
HttpEntity entity = response.getEntity();
if (entity != null) {
entity.writeTo(new FileOutputStream(dest));
FileOutputStream fos = new FileOutputStream(dest);
entity.writeTo(fos);
fos.close();
}
return code;
}
Expand Down

0 comments on commit 1bc88b9

Please sign in to comment.