|
||||||||||
| 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 | |
|---|---|
java.io.InputStream |
adapt(java.io.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 |
|---|
java.io.InputStream adapt(java.io.InputStream is,
ClientResponse response)
throws java.io.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
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||