public class BsonDocumentWriter extends AbstractBsonWriter
BsonWriter implementation that writes to an instance of BsonDocument. This can be used to encode an object into a
BsonDocument using an Encoder.BsonDocument,
EncoderAbstractBsonWriter.State| Constructor and Description |
|---|
BsonDocumentWriter(BsonDocument document)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doWriteBoolean(boolean value)
Handles the logic of writing a boolean value
|
void |
doWriteNull()
Handles the logic of writing a Null value
|
void |
doWriteObjectId(ObjectId value)
Handles the logic of writing an ObjectId
|
void |
doWriteRegularExpression(BsonRegularExpression value)
Handles the logic of writing a regular expression
|
void |
doWriteString(java.lang.String value)
Handles the logic of writing a String
|
void |
doWriteSymbol(java.lang.String value)
Handles the logic of writing a Symbol
|
void |
doWriteTimestamp(BsonTimestamp value)
Handles the logic of writing a timestamp
|
void |
doWriteUndefined()
Handles the logic of writing an Undefined value
|
void |
flush()
Flushes any pending data to the output destination.
|
BsonDocument |
getDocument()
Gets the document that the writer is writing to.
|
close, pipe, pipe, writeBinaryData, writeBinaryData, writeBoolean, writeBoolean, writeDateTime, writeDateTime, writeDBPointer, writeDBPointer, writeDecimal128, writeDecimal128, writeDouble, writeDouble, writeEndArray, writeEndDocument, writeInt32, writeInt32, writeInt64, writeInt64, writeJavaScript, writeJavaScript, writeJavaScriptWithScope, writeJavaScriptWithScope, writeMaxKey, writeMaxKey, writeMinKey, writeMinKey, writeName, writeNull, writeNull, writeObjectId, writeObjectId, writeRegularExpression, writeRegularExpression, writeStartArray, writeStartArray, writeStartDocument, writeStartDocument, writeString, writeString, writeSymbol, writeSymbol, writeTimestamp, writeTimestamp, writeUndefined, writeUndefinedpublic BsonDocumentWriter(BsonDocument document)
document - the document to write topublic BsonDocument getDocument()
public void doWriteBoolean(boolean value)
AbstractBsonWritervalue - the boolean value to writepublic void doWriteNull()
AbstractBsonWriterpublic void doWriteObjectId(ObjectId value)
AbstractBsonWritervalue - the ObjectId value to writepublic void doWriteRegularExpression(BsonRegularExpression value)
AbstractBsonWritervalue - the BsonRegularExpression value to writepublic void doWriteString(java.lang.String value)
AbstractBsonWritervalue - the String value to writepublic void doWriteSymbol(java.lang.String value)
AbstractBsonWritervalue - the boolean value to writepublic void doWriteTimestamp(BsonTimestamp value)
AbstractBsonWritervalue - the BsonTimestamp value to writepublic void doWriteUndefined()
AbstractBsonWriterpublic void flush()
BsonWriterCopyright © 2010 - 2023 Adobe. All Rights Reserved