Representation result = null;
if (getResponseStream() != null) {
result = new InputRepresentation(getResponseStream(), null);
} else if (getResponseChannel() != null) {
result = new ReadableRepresentation(getResponseChannel(), null);
} else if (getMethod().equals(Method.HEAD.getName())) {
result = new Representation() {
@Override
public ReadableByteChannel getChannel() throws IOException {
return null;