public class BasicBSONEncoder extends java.lang.Object implements BSONEncoder
| Constructor and Description |
|---|
BasicBSONEncoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
done()
Free the resources.
|
byte[] |
encode(BSONObject document)
Encode a document into byte array.
|
int |
putObject(BSONObject document)
Encodes a
BSONObject. |
void |
set(OutputBuffer buffer)
Sets the buffer to wrich the result of encoding will be written.
|
public byte[] encode(BSONObject document)
BSONEncoderOutputBuffer,
invokes the other 3 methods in a corresponding sequence:
and returns the contents of the OutputBuffer.encode in interface BSONEncoderdocument - the document to be encodedpublic void done()
BSONEncoderdone in interface BSONEncoderpublic void set(OutputBuffer buffer)
BSONEncoderset in interface BSONEncoderbuffer - the buffer to be used to write a byte sequences topublic int putObject(BSONObject document)
BSONObject. This is for the higher level api calls.putObject in interface BSONEncoderdocument - the document to encodeCopyright © 2010 - 2023 Adobe. All Rights Reserved