"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "fluent-hc/src/main/java/org/apache/http/client/fluent/InternalFileEntity.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.

InternalFileEntity.java  (httpcomponents-client-4.5.6-src):InternalFileEntity.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 68 skipping to change at line 68
public long getContentLength() { public long getContentLength() {
return this.file.length(); return this.file.length();
} }
@Override @Override
public InputStream getContent() throws IOException { public InputStream getContent() throws IOException {
return new FileInputStream(this.file); return new FileInputStream(this.file);
} }
@Override @Override
public void writeTo(final OutputStream outstream) throws IOException { public void writeTo(final OutputStream outStream) throws IOException {
Args.notNull(outstream, "Output stream"); Args.notNull(outStream, "Output stream");
final InputStream instream = new FileInputStream(this.file); final InputStream inStream = new FileInputStream(this.file);
try { try {
final byte[] tmp = new byte[4096]; final byte[] tmp = new byte[4096];
int l; int l;
while ((l = instream.read(tmp)) != -1) { while ((l = inStream.read(tmp)) != -1) {
outstream.write(tmp, 0, l); outStream.write(tmp, 0, l);
} }
outstream.flush(); outStream.flush();
} finally { } finally {
instream.close(); inStream.close();
} }
} }
@Override @Override
public boolean isStreaming() { public boolean isStreaming() {
return false; return false;
} }
} }
 End of changes. 4 change blocks. 
7 lines changed or deleted 7 lines changed or added

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