public class CompactJsonWriter extends Object implements JsonWriter
Modifier and Type | Class and Description |
---|---|
protected static class |
CompactJsonWriter.StringBuilderWriter |
Constructor and Description |
---|
CompactJsonWriter() |
Modifier and Type | Method and Description |
---|---|
protected void |
write(Binary value,
Writer writer) |
protected void |
write(boolean value,
Writer writer) |
protected void |
write(CodeWithScope value,
Writer writer) |
protected void |
write(Code value,
Writer writer) |
protected void |
write(Date value,
Writer writer) |
protected void |
write(Document.Field field,
Writer writer) |
protected void |
write(Document bson,
Writer writer) |
protected void |
write(double value,
Writer writer) |
protected void |
write(float value,
Writer writer) |
protected void |
write(int value,
Writer writer) |
protected void |
write(Iterable<?> arrayValue,
Writer writer) |
protected void |
write(long value,
Writer writer) |
protected void |
write(MaxKey value,
Writer writer) |
protected void |
write(MinKey value,
Writer writer) |
String |
write(Object object)
Write and return the modified JSON representation of the supplied in-memory
Document . |
protected void |
write(ObjectId value,
Writer writer) |
void |
write(Object object,
OutputStream stream)
Write to the supplied stream the modified JSON representation of the supplied in-memory
Document . |
void |
write(Object object,
StringBuilder writer)
Write to the supplied string builder the modified JSON representation of the supplied in-memory
Document . |
void |
write(Object object,
Writer writer)
Write to the supplied writer the modified JSON representation of the supplied in-memory
Document . |
protected void |
write(Pattern value,
Writer writer) |
protected void |
write(String value,
Writer writer) |
protected void |
write(Symbol value,
Writer writer) |
protected void |
write(Timestamp value,
Writer writer) |
protected void |
write(UUID value,
Writer writer) |
protected void |
writeArray(Object array,
Writer writer) |
protected void |
writeNull(Writer writer) |
public void write(Object object, OutputStream stream) throws IOException
JsonWriter
Document
.write
in interface JsonWriter
object
- the BSON object or BSON value; may not be nullstream
- the output stream; may not be nullIOException
- if there was a problem reading from the streampublic void write(Object object, Writer writer) throws IOException
JsonWriter
Document
.write
in interface JsonWriter
object
- the BSON object or BSON value; may not be nullwriter
- the writer; may not be nullIOException
- if there was a problem reading from the streampublic void write(Object object, StringBuilder writer)
JsonWriter
Document
.write
in interface JsonWriter
object
- the BSON object or BSON value; may not be nullwriter
- the string builder; may not be nullpublic String write(Object object)
JsonWriter
Document
.write
in interface JsonWriter
object
- the BSON object or BSON value; may not be nullprotected void write(boolean value, Writer writer) throws IOException
IOException
protected void write(int value, Writer writer) throws IOException
IOException
protected void write(long value, Writer writer) throws IOException
IOException
protected void write(float value, Writer writer) throws IOException
IOException
protected void write(double value, Writer writer) throws IOException
IOException
protected void writeNull(Writer writer) throws IOException
IOException
protected void write(String value, Writer writer) throws IOException
IOException
protected void write(Symbol value, Writer writer) throws IOException
IOException
protected void write(ObjectId value, Writer writer) throws IOException
IOException
protected void write(Date value, Writer writer) throws IOException
IOException
protected void write(Timestamp value, Writer writer) throws IOException
IOException
protected void write(MinKey value, Writer writer) throws IOException
IOException
protected void write(MaxKey value, Writer writer) throws IOException
IOException
protected void write(Pattern value, Writer writer) throws IOException
IOException
protected void write(Binary value, Writer writer) throws IOException
IOException
protected void write(UUID value, Writer writer) throws IOException
IOException
protected void write(Code value, Writer writer) throws IOException
IOException
protected void write(CodeWithScope value, Writer writer) throws IOException
IOException
protected void write(Document.Field field, Writer writer) throws IOException
IOException
protected void write(Document bson, Writer writer) throws IOException
IOException
protected void write(Iterable<?> arrayValue, Writer writer) throws IOException
IOException
protected void writeArray(Object array, Writer writer) throws IOException
IOException
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.