public class DefaultDBEncoder extends BasicBSONEncoder implements DBEncoder
Modifier and Type | Field and Description |
---|---|
static DBEncoderFactory |
FACTORY |
Constructor and Description |
---|
DefaultDBEncoder() |
Modifier and Type | Method and Description |
---|---|
protected void |
putDBRef(java.lang.String name,
DBRef ref)
Deals with encoding database references.
|
protected boolean |
putSpecial(java.lang.String name,
java.lang.Object value)
Special values are not encoded into documents.
|
java.lang.String |
toString() |
int |
writeObject(OutputBuffer outputBuffer,
BSONObject document)
Encode the BSONObject.
|
_putObjectField, done, encode, getBsonWriter, getOutputBuffer, putArray, putBinary, putBinary, putBoolean, putCode, putCodeWScope, putDate, putDecimal128, putIterable, putMap, putMaxKey, putMinKey, putName, putNull, putNumber, putObject, putObject, putObjectId, putPattern, putString, putSymbol, putTimestamp, putUndefined, putUUID, set
public static final DBEncoderFactory FACTORY
public int writeObject(OutputBuffer outputBuffer, BSONObject document)
DBEncoder
writeObject
in interface DBEncoder
outputBuffer
- the OutputBuffer to write todocument
- the BSONObject to writeprotected boolean putSpecial(java.lang.String name, java.lang.Object value)
BasicBSONEncoder
putSpecial
in class BasicBSONEncoder
name
- the field namevalue
- the valueprotected void putDBRef(java.lang.String name, DBRef ref)
name
- the name of the field in the documentref
- the database reference objectpublic java.lang.String toString()
toString
in class java.lang.Object