Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
Permalink
Browse files

Close stream after copy

  • Loading branch information...
thammegowda committed Jun 11, 2018
1 parent 9b26873 commit d7cec8561c63ece42a5314b63e4bb6e6ab5b9e15
Showing with 1 addition and 0 deletions.
  1. +1 −0 sparkler-api/src/main/java/edu/usc/irds/sparkler/util/FetcherDefault.java
@@ -142,6 +142,7 @@ public FetchedData fetch(Resource resource) throws Exception {
}
bufferOutStream.flush();
byte[] rawData = bufferOutStream.toByteArray();
IOUtils.closeQuietly(bufferOutStream);
FetchedData fetchedData = new FetchedData(rawData, urlConn.getContentType(), responseCode);
resource.setStatus(ResourceStatus.FETCHED.toString());
fetchedData.setResource(resource);

0 comments on commit d7cec85

Please sign in to comment.
You can’t perform that action at this time.