|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.client.http.LowLevelHttpResponse
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.
Constructor Summary | |
---|---|
LowLevelHttpResponse()
|
Method Summary | |
---|---|
void |
disconnect()
Default implementation does nothing, but subclasses may override to attempt to abort the connection or release allocated system resources for this connection. |
abstract InputStream |
getContent()
Returns the HTTP response content input stream or null for none. |
abstract String |
getContentEncoding()
Returns the content encoding (for example "gzip" ) or null for none. |
abstract long |
getContentLength()
Returns the content length or 0 for none. |
abstract String |
getContentType()
Returns the content type or null for none. |
abstract int |
getHeaderCount()
Returns the number of HTTP response headers. |
abstract String |
getHeaderName(int index)
Returns the HTTP response header name at the given zero-based index. |
abstract String |
getHeaderValue(int index)
Returns the HTTP response header value at the given zero-based index. |
abstract String |
getReasonPhrase()
Returns the HTTP reason phrase or null for none. |
abstract int |
getStatusCode()
Returns the response status code or 0 for none. |
abstract String |
getStatusLine()
Returns the response status line or null for none. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LowLevelHttpResponse()
Method Detail |
---|
public abstract InputStream getContent() throws IOException
null
for none.
IOException
- I/O exceptionpublic abstract String getContentEncoding()
"gzip"
) or null
for none.
public abstract long getContentLength()
0
for none.
public abstract String getContentType()
null
for none.
public abstract String getStatusLine()
null
for none.
public abstract int getStatusCode()
0
for none.
public abstract String getReasonPhrase()
null
for none.
public abstract int getHeaderCount()
Note that multiple headers of the same name need to be supported, in which case each header value is treated as a separate header.
public abstract String getHeaderName(int index)
public abstract String getHeaderValue(int index)
public void disconnect() throws IOException
IOException
- I/O exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |