String contentType = getMethod.getResponseHeader("Content-type").getValue();
String characterEncoding = getMethod.getResponseCharSet();
Header contentLengthHeader = getMethod.getResponseHeader("Content-length");
if ( contentLengthHeader == null ) return NullValue.NULL;
int contentLength = Integer.parseInt(getMethod.getResponseHeader("Content-length").getValue());
return new InputStreamValue(stream, contentType, characterEncoding, contentLength, true);
}