"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient-cache/src/main/java/org/apache/http/impl/client/cache/IOUtils.java" between
httpcomponents-client-4.5.6-src.tar.gz and httpcomponents-client-4.5.7-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

IOUtils.java  (httpcomponents-client-4.5.6-src):IOUtils.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 46 skipping to change at line 46
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
class IOUtils { class IOUtils {
static void consume(final HttpEntity entity) throws IOException { static void consume(final HttpEntity entity) throws IOException {
if (entity == null) { if (entity == null) {
return; return;
} }
if (entity.isStreaming()) { if (entity.isStreaming()) {
final InputStream instream = entity.getContent(); final InputStream inStream = entity.getContent();
if (instream != null) { if (inStream != null) {
instream.close(); inStream.close();
} }
} }
} }
static void copy(final InputStream in, final OutputStream out) throws IOExce ption { static void copy(final InputStream in, final OutputStream out) throws IOExce ption {
final byte[] buf = new byte[2048]; final byte[] buf = new byte[2048];
int len; int len;
while ((len = in.read(buf)) != -1) { while ((len = in.read(buf)) != -1) {
out.write(buf, 0, len); out.write(buf, 0, len);
} }
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)