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
        Parameters:
        outputBuffer - the OutputBuffer to write to
        document - the BSONObject to write
        Returns:
        the number of characters in the encoding
      • putDBRef

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