|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.client.json.JsonGenerator
com.google.api.client.testing.http.json.MockJsonGenerator
public class MockJsonGenerator
Mock for JsonGenerator.
Implementation is thread-safe.
| Method Summary | |
|---|---|
void |
close()
Closes the serializer and the underlying output stream or writer, and releases any memory associated with it. |
void |
flush()
Flushes any buffered content to the underlying output stream or writer. |
JsonFactory |
getFactory()
Returns the JSON factory from which this generator was created. |
void |
writeBoolean(boolean state)
Writes a literal JSON boolean value ('true' or 'false'). |
void |
writeEndArray()
Writes a JSON end array character ']'. |
void |
writeEndObject()
Writes a JSON end object character '}'. |
void |
writeFieldName(String name)
Writes a JSON quoted field name. |
void |
writeNull()
Writes a literal JSON null value. |
void |
writeNumber(BigDecimal v)
Writes a JSON big decimal value. |
void |
writeNumber(BigInteger v)
Writes a JSON big integer value. |
void |
writeNumber(double v)
Writes a JSON double value. |
void |
writeNumber(float v)
Writes a JSON float value. |
void |
writeNumber(int v)
Writes a JSON int value. |
void |
writeNumber(long v)
Writes a JSON long value. |
void |
writeNumber(String encodedValue)
Writes a JSON numeric value that has already been encoded properly. |
void |
writeNumber(com.google.common.primitives.UnsignedInteger v)
Writes a JSON unsigned integer value. |
void |
writeNumber(com.google.common.primitives.UnsignedLong v)
Writes a JSON unsigned long value. |
void |
writeStartArray()
Writes a JSON start array character '['. |
void |
writeStartObject()
Writes a JSON start object character '{'. |
void |
writeString(String value)
Writes a JSON quoted string value. |
| Methods inherited from class com.google.api.client.json.JsonGenerator |
|---|
enablePrettyPrint, serialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public JsonFactory getFactory()
JsonGenerator
getFactory in class JsonGenerator
public void flush()
throws IOException
JsonGenerator
flush in class JsonGeneratorIOException
public void close()
throws IOException
JsonGenerator
close in class JsonGeneratorIOException
public void writeStartArray()
throws IOException
JsonGenerator
writeStartArray in class JsonGeneratorIOException
public void writeEndArray()
throws IOException
JsonGenerator
writeEndArray in class JsonGeneratorIOException
public void writeStartObject()
throws IOException
JsonGenerator
writeStartObject in class JsonGeneratorIOException
public void writeEndObject()
throws IOException
JsonGenerator
writeEndObject in class JsonGeneratorIOException
public void writeFieldName(String name)
throws IOException
JsonGenerator
writeFieldName in class JsonGeneratorIOException
public void writeNull()
throws IOException
JsonGenerator
writeNull in class JsonGeneratorIOException
public void writeString(String value)
throws IOException
JsonGenerator
writeString in class JsonGeneratorIOException
public void writeBoolean(boolean state)
throws IOException
JsonGenerator
writeBoolean in class JsonGeneratorIOException
public void writeNumber(int v)
throws IOException
JsonGenerator
writeNumber in class JsonGeneratorIOException
public void writeNumber(long v)
throws IOException
JsonGenerator
writeNumber in class JsonGeneratorIOException
public void writeNumber(BigInteger v)
throws IOException
JsonGenerator
writeNumber in class JsonGeneratorIOException
public void writeNumber(com.google.common.primitives.UnsignedInteger v)
throws IOException
JsonGenerator
writeNumber in class JsonGeneratorIOException
public void writeNumber(com.google.common.primitives.UnsignedLong v)
throws IOException
JsonGenerator
writeNumber in class JsonGeneratorIOException
public void writeNumber(float v)
throws IOException
JsonGenerator
writeNumber in class JsonGeneratorIOException
public void writeNumber(double v)
throws IOException
JsonGenerator
writeNumber in class JsonGeneratorIOException
public void writeNumber(BigDecimal v)
throws IOException
JsonGenerator
writeNumber in class JsonGeneratorIOException
public void writeNumber(String encodedValue)
throws IOException
JsonGenerator
writeNumber in class JsonGeneratorIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||