Class Apache5ResponseContent (2.0.2)
public class Apache5ResponseContent extends InputStream
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.
Constructors
Apache5ResponseContent(InputStream wrappedStream, ClassicHttpResponse response)
public Apache5ResponseContent(InputStream wrappedStream, ClassicHttpResponse response)
Parameters |
Name |
Description |
wrappedStream |
InputStream
|
response |
org.apache.hc.core5.http.ClassicHttpResponse
|
Methods
available()
Returns |
Type |
Description |
int |
|
Overrides
close()
Overrides
mark(int readlimit)
public synchronized void mark(int readlimit)
Parameter |
Name |
Description |
readlimit |
int
|
Overrides
markSupported()
public boolean markSupported()
Overrides
read()
Returns |
Type |
Description |
int |
|
Overrides
read(byte[] b)
public int read(byte[] b)
Parameter |
Name |
Description |
b |
byte[]
|
Returns |
Type |
Description |
int |
|
Overrides
read(byte[] b, int off, int len)
public int read(byte[] b, int off, int len)
Parameters |
Name |
Description |
b |
byte[]
|
off |
int
|
len |
int
|
Returns |
Type |
Description |
int |
|
Overrides
reset()
public synchronized void reset()
Overrides
skip(long n)
Parameter |
Name |
Description |
n |
long
|
Returns |
Type |
Description |
long |
|
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-14 UTC."],[],[]]