BasicBSONEncoder
Date: 2015-03-03

org.bson

## Class BasicBSONEncoder

- java.lang.Object
- - org.bson.BasicBSONEncoder

- All Implemented Interfaces:
    BSONEncoder

      public class BasicBSONEncoder
      extends java.lang.Object
      implements BSONEncoder

  this is meant to be pooled or cached there is some per instance memory for string conversion, etc...

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BasicBSONEncoder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `done()`
    `byte[]` | `encode(BSONObject o)`
    `int` | `putObject(BSONObject o)` Encodes a `BSONObject`.
    `void` | `set(OutputBuffer out)`
    `void` | `writeCString(java.lang.String s)`
    `void` | `writeInt(int x)`
    `void` | `writeLong(long x)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BasicBSONEncoder

          public BasicBSONEncoder()

  - ### Method Detail

    - #### encode

          public byte[] encode(BSONObject o)

      Specified by:
        `encode` in interface `BSONEncoder`

    - #### set

          public void set(OutputBuffer out)

      Specified by:
        `set` in interface `BSONEncoder`

    - #### done

          public void done()

      Specified by:
        `done` in interface `BSONEncoder`

    - #### putObject

          public int putObject(BSONObject o)

      Encodes a `BSONObject`. This is for the higher level api calls
      Specified by:
        `putObject` in interface `BSONEncoder`
      Parameters:
        `o` - the object to encode
      Returns:
        the number of characters in the encoding

    - #### writeInt

          public void writeInt(int x)

    - #### writeLong

          public void writeLong(long x)

    - #### writeCString

          public void writeCString(java.lang.String s)