size()函数返回的bson文档的int值是字节数吗?(无法找到此API的详细信息)。如何以字节为单位获取bson文档的大小?这是我的代码。
import org.bson.Document;
MongoDatabase db...;
MongoCollection<Document> mongoCollection = db.getCollection(...);
MongoCursor<Document> cursor = mongoCollection.find().iterator();
Document doc = cursor.next();
int size = doc.size(); // does this return number of bytes
// how to get size of doc in bytes?