content
Input stream content of HTTP response or
null by default.private InputStreamnull by default.private Stringnull for none.private long-1 if unknown.private Stringnull by default.private booleandisconnect() has been called.private Stringnull for none.private int200 by default.voidnull for none."gzip") or null for none.long0 for none.final Stringnull for none.intgetHeaderName(int index) getHeaderValue(int index) null for none.int<=0 for none.null for none.booleandisconnect() has been called.setContent(byte[] byteContent) setContent(InputStream content) null for none.setContent(String stringContent) setContentEncoding(String contentEncoding) null for none.setContentLength(long contentLength) -1 for unknown.setContentType(String contentType) null for none.setHeaderNames(List<String> headerNames) setHeaderValues(List<String> headerValues) setReasonPhrase(String reasonPhrase) null for none.setStatusCode(int statusCode) null and the content length to 0.null by default.null by default.200 by default.null for none.null for none.-1 if unknown.disconnect() has been called.name - header namevalue - header valueIf the input string is null, it will set the content to null. Else, it will
use TestableByteArrayInputStream with the UTF-8 encoded string content.
stringContent - content string or null for nonebyteContent - content byte array, or null for none.
If the byte array is null, the method invokes setZeroContent().
Otherwise, byteContent is wrapped in a TestableByteArrayInputStream and
becomes this MockLowLevelHttpResponse's contents.
null and the content length to 0. Note that the result will have a
content length header whose value is 0.LowLevelHttpResponsenull for none.getContent in class LowLevelHttpResponseIOException - I/O exceptionLowLevelHttpResponse"gzip") or null for none.getContentEncoding in class LowLevelHttpResponseLowLevelHttpResponse0 for none.getContentLength in class LowLevelHttpResponseLowLevelHttpResponsenull for none.getContentType in class LowLevelHttpResponseLowLevelHttpResponseNote that multiple headers of the same name need to be supported, in which case each header value is treated as a separate header.
getHeaderCount in class LowLevelHttpResponseLowLevelHttpResponsegetHeaderName in class LowLevelHttpResponseLowLevelHttpResponsegetHeaderValue in class LowLevelHttpResponseLowLevelHttpResponsenull for none.getReasonPhrase in class LowLevelHttpResponseLowLevelHttpResponse<=0 for none.getStatusCode in class LowLevelHttpResponseLowLevelHttpResponsenull for none.getStatusLine in class LowLevelHttpResponseDefault value is an empty list.
null for none.null for none.null for none.-1 for unknown.
By default it is -1.
Default value is 200.
null for none.LowLevelHttpResponsedisconnect in class LowLevelHttpResponseIOException - I/O exception