|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.testing.http.MockHttpContent
public class MockHttpContent
Mock for HttpContent.
| Field Summary | |
|---|---|
byte[] |
content
HTTP content or an empty byte array by default. |
String |
encoding
HTTP content encoding or null by default. |
long |
length
HTTP content length or -1 by default. |
String |
type
HTTP content type or null by default. |
| Constructor Summary | |
|---|---|
MockHttpContent()
|
|
| Method Summary | |
|---|---|
String |
getEncoding()
Returns the content encoding (for example "gzip") or null for none. |
long |
getLength()
Returns the content length or less than zero if not known. |
String |
getType()
Returns the content type or null for none. |
boolean |
retrySupported()
Returns whether or not retry is supported on this content type. |
void |
writeTo(OutputStream out)
Writes the content to the given output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String encoding
null by default.
public long length
-1 by default.
public String type
null by default.
public byte[] content
| Constructor Detail |
|---|
public MockHttpContent()
| Method Detail |
|---|
public String getEncoding()
HttpContent"gzip") or null for none.
getEncoding in interface HttpContent
public long getLength()
throws IOException
HttpContent
getLength in interface HttpContentIOExceptionpublic String getType()
HttpContentnull for none.
getType in interface HttpContent
public void writeTo(OutputStream out)
throws IOException
HttpContent
writeTo in interface HttpContentIOExceptionpublic boolean retrySupported()
HttpContent
retrySupported in interface HttpContent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||