Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
added @Deprecated
orbiter07e89a7ae53a
diff --git a/source/net/yacy/cora/protocol/http/NonClosingInputStreamEntity.java b/source/net/yacy/cora/protocol/http/NonClosingInputStreamEntity.javaindex aa72fe07e..6eecda75a 100644--- a/source/net/yacy/cora/protocol/http/NonClosingInputStreamEntity.java+++ b/source/net/yacy/cora/protocol/http/NonClosingInputStreamEntity.java@@ -46,7 +46,7 @@ public class NonClosingInputStreamEntity extends AbstractHttpEntity {private final InputStream content;private final long length;- public NonClosingInputStreamEntity(final InputStream instream, long length) {+ public NonClosingInputStreamEntity(final InputStream instream, final long length) {super();if (instream == null) {throw new IllegalArgumentException("Source input stream may not be null");@@ -71,8 +71,8 @@ public class NonClosingInputStreamEntity extends AbstractHttpEntity {if (outstream == null) {throw new IllegalArgumentException("Output stream may not be null");}- InputStream instream = this.content;- byte[] buffer = new byte[BUFFER_SIZE];+ final InputStream instream = this.content;+ final byte[] buffer = new byte[BUFFER_SIZE];int l;if (this.length < 0) {// consume until EOF@@ -101,6 +101,7 @@ public class NonClosingInputStreamEntity extends AbstractHttpEntity {* @deprecated Either use {@link #getContent()} and call {@link java.io.InputStream#close()} on that;* otherwise call {@link #writeTo(OutputStream)} which is required to free the resources.*/+ @Deprecatedpublic void consumeContent() throws IOException {// If the input stream is from a connection, closing it will read to// the end of the content. Otherwise, we don't care what it does.