|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InputStreamAdapter
Interface for adapting the input stream
Method Summary | |
---|---|
InputStream |
adapt(InputStream is,
ClientResponse response)
This method is called in order to wrap the response input stream with another input stream to allow the manipulation of the response entity stream. |
Method Detail |
---|
InputStream adapt(InputStream is, ClientResponse response) throws IOException
For example:
public InputStream adapt(InputStream is, ClientResponse response) throws IOException { String header = response.getHeaders().getFirst("Content-Encoding"); if (header != null && header.equalsIgnoreCase("gzip")) { return new GZIPInputStream(is); } return is; }
is
- the current response input streamresponse
- the response
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |