Example usage for com.mongodb DBEncoder writeObject

List of usage examples for com.mongodb DBEncoder writeObject

Introduction

In this page you can find the example usage for com.mongodb DBEncoder writeObject.

Prototype

int writeObject(OutputBuffer outputBuffer, BSONObject document);

Source Link

Document

Encode the BSONObject.

Usage

From source file:org.jongo.bson.BufferedBsonDocument.java

License:Apache License

private void encode(BSONObject dbo) {
    DBEncoder dbEncoder = DefaultDBEncoder.FACTORY.create();
    dbEncoder.writeObject(buffer, dbo);
}