class BSONCallbackAdapter extends AbstractBsonWriter
| Modifier and Type | Class and Description |
|---|---|
class |
BSONCallbackAdapter.Context |
AbstractBsonWriter.Mark, AbstractBsonWriter.State| Modifier and Type | Field and Description |
|---|---|
private BSONCallback |
bsonCallback |
| Modifier | Constructor and Description |
|---|---|
protected |
BSONCallbackAdapter(BsonWriterSettings settings,
BSONCallback bsonCallback)
Initializes a new instance of the BsonWriter class.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doWriteBinaryData(BsonBinary value)
Handles the logic of writing a
BsonBinary value |
void |
doWriteBoolean(boolean value)
Handles the logic of writing a boolean value
|
protected void |
doWriteDateTime(long value)
Handles the logic of writing a date time value
|
protected void |
doWriteDBPointer(BsonDbPointer value)
Handles the logic of writing a DbPointer value
|
protected void |
doWriteDecimal128(Decimal128 value)
Handles the logic of writing a Decimal128 value
|
protected void |
doWriteDouble(double value)
Handles the logic of writing a Double value
|
protected void |
doWriteEndArray()
Handles the logic of writing the end of an array
|
protected void |
doWriteEndDocument()
Handles the logic of writing the end of a document
|
protected void |
doWriteInt32(int value)
Handles the logic of writing an int32 value
|
protected void |
doWriteInt64(long value)
Handles the logic of writing an int64 value
|
protected void |
doWriteJavaScript(java.lang.String value)
Handles the logic of writing a JavaScript function
|
protected void |
doWriteJavaScriptWithScope(java.lang.String value)
Handles the logic of writing a scoped JavaScript function
|
protected void |
doWriteMaxKey()
Handles the logic of writing a Max key
|
protected void |
doWriteMinKey()
Handles the logic of writing a Min key
|
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 |
doWriteStartArray()
Handles the logic to start writing an array
|
void |
doWriteStartDocument()
Handles the logic to start writing a document
|
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.
|
protected BSONCallbackAdapter.Context |
getContext()
Get the context, which will indicate which state the writer is in, for example which part of a document it's currently writing.
|
protected java.lang.String |
getName()
The name of the field being written.
|
checkPreconditions, checkState, close, getNextState, getState, isClosed, pipe, setContext, setState, throwInvalidContextType, throwInvalidState, 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, writeUndefinedprivate BSONCallback bsonCallback
protected BSONCallbackAdapter(BsonWriterSettings settings, BSONCallback bsonCallback)
settings - The writer settings.bsonCallback - The callback to inform of operations on this writerpublic void flush()
BsonWriterpublic void doWriteStartDocument()
AbstractBsonWriterdoWriteStartDocument in class AbstractBsonWriterprotected void doWriteEndDocument()
AbstractBsonWriterdoWriteEndDocument in class AbstractBsonWriterpublic void doWriteStartArray()
AbstractBsonWriterdoWriteStartArray in class AbstractBsonWriterprotected void doWriteEndArray()
AbstractBsonWriterdoWriteEndArray in class AbstractBsonWriterprotected void doWriteBinaryData(BsonBinary value)
AbstractBsonWriterBsonBinary valuedoWriteBinaryData in class AbstractBsonWritervalue - the BsonBinary value to writepublic void doWriteBoolean(boolean value)
AbstractBsonWriterdoWriteBoolean in class AbstractBsonWritervalue - the boolean value to writeprotected void doWriteDateTime(long value)
AbstractBsonWriterdoWriteDateTime in class AbstractBsonWritervalue - the long value to writeprotected void doWriteDBPointer(BsonDbPointer value)
AbstractBsonWriterdoWriteDBPointer in class AbstractBsonWritervalue - the BsonDbPointer value to writeprotected void doWriteDouble(double value)
AbstractBsonWriterdoWriteDouble in class AbstractBsonWritervalue - the double value to writeprotected void doWriteInt32(int value)
AbstractBsonWriterdoWriteInt32 in class AbstractBsonWritervalue - the int value to writeprotected void doWriteInt64(long value)
AbstractBsonWriterdoWriteInt64 in class AbstractBsonWritervalue - the long value to writeprotected void doWriteDecimal128(Decimal128 value)
AbstractBsonWriterdoWriteDecimal128 in class AbstractBsonWritervalue - the Decimal128 value to writeprotected void doWriteJavaScript(java.lang.String value)
AbstractBsonWriterdoWriteJavaScript in class AbstractBsonWritervalue - the String value to writeprotected void doWriteJavaScriptWithScope(java.lang.String value)
AbstractBsonWriterdoWriteJavaScriptWithScope in class AbstractBsonWritervalue - the boolean value to writeprotected void doWriteMaxKey()
AbstractBsonWriterdoWriteMaxKey in class AbstractBsonWriterprotected void doWriteMinKey()
AbstractBsonWriterdoWriteMinKey in class AbstractBsonWriterpublic void doWriteNull()
AbstractBsonWriterdoWriteNull in class AbstractBsonWriterpublic void doWriteObjectId(ObjectId value)
AbstractBsonWriterdoWriteObjectId in class AbstractBsonWritervalue - the ObjectId value to writepublic void doWriteRegularExpression(BsonRegularExpression value)
AbstractBsonWriterdoWriteRegularExpression in class AbstractBsonWritervalue - the BsonRegularExpression value to writepublic void doWriteString(java.lang.String value)
AbstractBsonWriterdoWriteString in class AbstractBsonWritervalue - the String value to writepublic void doWriteSymbol(java.lang.String value)
AbstractBsonWriterdoWriteSymbol in class AbstractBsonWritervalue - the boolean value to writepublic void doWriteTimestamp(BsonTimestamp value)
AbstractBsonWriterdoWriteTimestamp in class AbstractBsonWritervalue - the BsonTimestamp value to writepublic void doWriteUndefined()
AbstractBsonWriterdoWriteUndefined in class AbstractBsonWriterprotected BSONCallbackAdapter.Context getContext()
AbstractBsonWritergetContext in class AbstractBsonWriterprotected java.lang.String getName()
AbstractBsonWritergetName in class AbstractBsonWriter