use of org.glassfish.jersey.client.ClientResponse in project jersey by jersey.
the class InMemoryConnector method createClientResponse.
private ClientResponse createClientResponse(final ClientRequest clientRequest, final InMemoryResponseWriter responseWriter) {
final ClientResponse clientResponse = new ClientResponse(responseWriter.getStatusInfo(), clientRequest);
clientResponse.getHeaders().putAll(responseWriter.getHeaders());
clientResponse.setEntityStream(new ByteArrayInputStream(responseWriter.getEntity()));
return clientResponse;
}
Aggregations