Class that wraps an org.apache.hc.core5.http.HttpEntity's content InputStream
along with the ClassicHttpResponse that contains this entity. The main purpose is to be
able to close the response as well as the content input stream when #close() is called,
in order to not break the existing contract with clients using apache v4 that only required them
to close the input stream to clean up all resources.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class Apache5ResponseContent (2.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0 (latest)](/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache.v5.Apache5ResponseContent)\n- [1.47.1](/java/docs/reference/google-http-client/1.47.1/com.google.api.client.http.apache.v5.Apache5ResponseContent)\n- [1.46.3](/java/docs/reference/google-http-client/1.46.3/com.google.api.client.http.apache.v5.Apache5ResponseContent)\n- [1.45.3](/java/docs/reference/google-http-client/1.45.3/com.google.api.client.http.apache.v5.Apache5ResponseContent)\n- [1.44.2](/java/docs/reference/google-http-client/1.44.2/com.google.api.client.http.apache.v5.Apache5ResponseContent)\n- [1.43.2](/java/docs/reference/google-http-client/1.43.2/com.google.api.client.http.apache.v5.Apache5ResponseContent)\n- [1.42.3](/java/docs/reference/google-http-client/1.42.3/com.google.api.client.http.apache.v5.Apache5ResponseContent)\n- [1.41.8](/java/docs/reference/google-http-client/1.41.8/com.google.api.client.http.apache.v5.Apache5ResponseContent) \n\n public class Apache5ResponseContent extends InputStream\n\nClass that wraps an org.apache.hc.core5.http.HttpEntity's content [InputStream](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html)\nalong with the ClassicHttpResponse that contains this entity. The main purpose is to be\nable to close the response as well as the content input stream when [#close()](/java/docs/reference/google-http-client/latest/com.google.api.client.http.apache.v5.Apache5ResponseContent#com_google_api_client_http_apache_v5_Apache5ResponseContent_close__) is called,\nin order to not break the existing contract with clients using apache v4 that only required them\nto close the input stream to clean up all resources. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e [InputStream](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html) \\\u003e Apache5ResponseContent \n\nInherited Members\n-----------------\n\n[InputStream.available()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#available--) \n[InputStream.close()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#close--) \n[InputStream.mark(int)](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#mark-int-) \n[InputStream.markSupported()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#markSupported--) \n[InputStream.nullInputStream()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#nullInputStream--) \n[InputStream.read()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#read--) \n[InputStream.read(byte\\[\\])](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#read-byte[]-) \n[InputStream.read(byte\\[\\],int,int)](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#read-byte[]-int-int-) \n[InputStream.readAllBytes()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#readAllBytes--) \n[InputStream.readNBytes(byte\\[\\],int,int)](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#readNBytes-byte[]-int-int-) \n[InputStream.readNBytes(int)](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#readNBytes-int-) \n[InputStream.reset()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#reset--) \n[InputStream.skip(long)](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#skip-long-) \n[InputStream.skipNBytes(long)](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#skipNBytes-long-) \n[InputStream.transferTo(OutputStream)](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#transferTo-java.io.OutputStream-) \n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### Apache5ResponseContent(InputStream wrappedStream, ClassicHttpResponse response)\n\n public Apache5ResponseContent(InputStream wrappedStream, ClassicHttpResponse response)\n\nMethods\n-------\n\n### available()\n\n public int available()\n\n**Overrides** \n[InputStream.available()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#available--)\n\n### close()\n\n public void close()\n\n**Overrides** \n[InputStream.close()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#close--)\n\n### mark(int readlimit)\n\n public synchronized void mark(int readlimit)\n\n**Overrides** \n[InputStream.mark(int)](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#mark-int-)\n\n### markSupported()\n\n public boolean markSupported()\n\n**Overrides** \n[InputStream.markSupported()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#markSupported--)\n\n### read()\n\n public int read()\n\n**Overrides** \n[InputStream.read()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#read--)\n\n### read(byte\\[\\] b)\n\n public int read(byte[] b)\n\n**Overrides** \n[InputStream.read(byte\\[\\])](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#read-byte[]-)\n\n### read(byte\\[\\] b, int off, int len)\n\n public int read(byte[] b, int off, int len)\n\n**Overrides** \n[InputStream.read(byte\\[\\],int,int)](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#read-byte[]-int-int-)\n\n### reset()\n\n public synchronized void reset()\n\n**Overrides** \n[InputStream.reset()](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#reset--)\n\n### skip(long n)\n\n public long skip(long n)\n\n**Overrides** \n[InputStream.skip(long)](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#skip-long-)"]]