if (_response != null) { InputStream is = _response.getContentStream(); if (is != null && is instanceof CopyInputStream) { try { if (is.available()>0) { while (is.read() > 0); } } catch (IOException ioe) { System.out.println("Error flushing the conversation : " + ioe); } _response.setContent(((CopyInputStream) is).toByteArray()); _response.setContentStream(null); } }
    public Response getResponse() {        if (_response != null) {            InputStream is = _response.getContentStream();            if (is != null && is instanceof CopyInputStream) {                try {                    if (is.available()>0) {                        while (is.read() > 0);                    }                } catch (IOException ioe) {                    System.out.println("Error flushing the conversation : " + ioe);                }                _response.setContent(((CopyInputStream) is).toByteArray());                _response.setContentStream(null);            }        }        return _response;    }