Package org.bson
Class BasicBSONEncoder
java.lang.Object
org.bson.BasicBSONEncoder
- All Implemented Interfaces:
BSONEncoder
- Direct Known Subclasses:
DefaultDBEncoder
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
This is meant to be pooled or cached. There is some per instance memory for string conversion, etc...
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddone()Deprecated.Free the resources.byte[]encode(BSONObject document) Deprecated.Encode a document into byte array.intputObject(BSONObject document) Deprecated.Encodes aBSONObject.voidset(OutputBuffer buffer) Deprecated.Sets the buffer to wrich the result of encoding will be written.
-
Constructor Details
-
BasicBSONEncoder
public BasicBSONEncoder()Deprecated.
-
-
Method Details
-
encode
Deprecated.Description copied from interface:BSONEncoderEncode a document into byte array. This is a shortcut method which creates a newOutputBuffer, invokes the other 3 methods in a corresponding sequence: and returns the contents of theOutputBuffer.- Specified by:
encodein interfaceBSONEncoder- Parameters:
document- the document to be encoded- Returns:
- a byte sequence
-
done
public void done()Deprecated.Description copied from interface:BSONEncoderFree the resources.- Specified by:
donein interfaceBSONEncoder
-
set
Deprecated.Description copied from interface:BSONEncoderSets the buffer to wrich the result of encoding will be written.- Specified by:
setin interfaceBSONEncoder- Parameters:
buffer- the buffer to be used to write a byte sequences to
-
putObject
Deprecated.Encodes aBSONObject. This is for the higher level api calls.- Specified by:
putObjectin interfaceBSONEncoder- Parameters:
document- the document to encode- Returns:
- the number of characters in the encoding
-