*/
public byte[] write( Object object ) throws IOException {
BsonDataOutput buffer = new BsonDataOutput();
write(null, object, buffer);
ByteArrayOutputStream stream = new ByteArrayOutputStream(buffer.size());
buffer.writeTo(stream);
return stream.toByteArray();
}
/**
* Write to the supplied output the binary BSON representation of the supplied in-memory {@link Document}.