|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.client.uploader.ResumableHttpFileUploader.ResponseMessage
public static class ResumableHttpFileUploader.ResponseMessage
The response message returned by the upload task when it has finished
uploading the last chunk. The response message instance will hold the
expected Content-Length header value and the InputStream
returned
by the HTTP connection. Note that the input stream might not be ready yet
to read from when the upload task is finished. The connection might still
be receiving the message body.
Constructor Summary | |
---|---|
ResumableHttpFileUploader.ResponseMessage(int contentLength,
java.io.InputStream inputStream)
|
Method Summary | |
---|---|
int |
getContentLength()
Returns the value of the Content-Length header of the HTTP response. |
java.io.InputStream |
getInputStream()
Returns the last request's connection's input stream to read the response body from. |
java.lang.String |
receiveMessage(long timeoutMs)
Attempts to receive the entire outstanding response message body and returns it as a string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResumableHttpFileUploader.ResponseMessage(int contentLength, java.io.InputStream inputStream)
Method Detail |
---|
public int getContentLength()
public java.io.InputStream getInputStream()
public java.lang.String receiveMessage(long timeoutMs) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
timeoutMs
- the maximum time to wait for the message to be received.
java.lang.InterruptedException
- if the task gets interrupted.
java.util.concurrent.ExecutionException
- if a IOException
is thrown while
reading from the input stream.
java.util.concurrent.TimeoutException
- if the entire message couldn't be received in
the allotted timeout.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |