Send feedback
Class LowLevelHttpResponse (1.45.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.45.1 keyboard_arrow_down
public abstract class LowLevelHttpResponse
Low-level HTTP response.
This allows providing a different implementation of the HTTP response that is more compatible
with the Java environment used.
Implementation has no fields and therefore thread-safe, but sub-classes are not necessarily
thread-safe.
Constructors
LowLevelHttpResponse()
public LowLevelHttpResponse ()
Methods
disconnect()
Default implementation does nothing, but subclasses may override to attempt to abort the
connection or release allocated system resources for this connection.
getContent()
public abstract InputStream getContent ()
Returns the HTTP response content input stream or null
for none.
getContentEncoding()
public abstract String getContentEncoding ()
Returns the content encoding (for example "gzip"
) or null
for none.
Returns
Type
Description
String
getContentLength()
public abstract long getContentLength ()
Returns the content length or 0
for none.
Returns
Type
Description
long
getContentType()
public abstract String getContentType ()
Returns the content type or null
for none.
Returns
Type
Description
String
public abstract int getHeaderCount ()
Returns the number of HTTP response headers.
Note that multiple headers of the same name need to be supported, in which case each header
value is treated as a separate header.
Returns
Type
Description
int
public abstract String getHeaderName ( int index )
Returns the HTTP response header name at the given zero-based index.
Parameter
Name
Description
index
int
Returns
Type
Description
String
public abstract String getHeaderValue ( int index )
Returns the HTTP response header value at the given zero-based index.
Parameter
Name
Description
index
int
Returns
Type
Description
String
getReasonPhrase()
public abstract String getReasonPhrase ()
Returns the HTTP reason phrase or null
for none.
Returns
Type
Description
String
getStatusCode()
public abstract int getStatusCode ()
Returns the response status code or <=0
for none.
Returns
Type
Description
int
getStatusLine()
public abstract String getStatusLine ()
Returns the response status line or null
for none.
Returns
Type
Description
String
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-06 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-06 UTC."],[],[]]