Package com.mongodb

Class DefaultDBEncoder

    • Constructor Detail

      • DefaultDBEncoder

        public DefaultDBEncoder()
    • Method Detail

      • writeObject

        public int writeObject​(OutputBuffer outputBuffer,
                               BSONObject document)
        Description copied from interface: DBEncoder
        Encode the BSONObject.
        Specified by:
        writeObject in interface DBEncoder
        outputBuffer - the OutputBuffer to write to
        document - the BSONObject to write
        the number of characters in the encoding
      • putDBRef

        protected void putDBRef​(String name,
                                DBRef ref)
        Deals with encoding database references.
        name - the name of the field in the document
        ref - the database reference object