public class LazyBSONCallback extends EmptyBSONCallback
BSONCallback for creation of LazyBSONObject and LazyBSONList instances.| Constructor and Description |
|---|
LazyBSONCallback() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List |
createArray(byte[] bytes,
int offset)
Create a
LazyBSONList from the given bytes starting from the given offset. |
java.lang.Object |
createDBRef(java.lang.String ns,
ObjectId id)
This is a factory method pattern to create appropriate objects for BSON type DBPointer(0x0c).
|
java.lang.Object |
createObject(byte[] bytes,
int offset)
Create a
LazyBSONObject instance from the given bytes starting from the given offset. |
java.lang.Object |
get()
Returns the finished top-level Document.
|
void |
gotBinary(java.lang.String name,
byte type,
byte[] data)
Called when reading a field with a
BsonType.BINARY value. |
void |
reset()
Resets the callback, clearing all state.
|
arrayDone, arrayStart, arrayStart, createBSONCallback, gotBinaryArray, gotBoolean, gotCode, gotCodeWScope, gotDate, gotDBRef, gotDecimal128, gotDouble, gotInt, gotLong, gotMaxKey, gotMinKey, gotNull, gotObjectId, gotRegex, gotString, gotSymbol, gotTimestamp, gotUndefined, gotUUID, objectDone, objectStart, objectStartpublic void reset()
BSONCallbackreset in interface BSONCallbackreset in class EmptyBSONCallbackpublic java.lang.Object get()
BSONCallbackget in interface BSONCallbackget in class EmptyBSONCallbackpublic void gotBinary(java.lang.String name,
byte type,
byte[] data)
BSONCallbackBsonType.BINARY value. Note that binary values have a subtype, which may
determine how the value is processed.gotBinary in interface BSONCallbackgotBinary in class EmptyBSONCallbackname - the name of the fieldtype - one of the binary subtypes: BsonBinarySubTypedata - the field's valuepublic java.lang.Object createObject(byte[] bytes,
int offset)
LazyBSONObject instance from the given bytes starting from the given offset.bytes - the raw BSON bytesoffset - the offset into the bytespublic java.util.List createArray(byte[] bytes,
int offset)
LazyBSONList from the given bytes starting from the given offset.bytes - the raw BSON bytesoffset - the offset into the bytespublic java.lang.Object createDBRef(java.lang.String ns,
ObjectId id)
ns - the namespace of the referenceid - the identifier of the referenceCopyright © 2010 - 2023 Adobe. All Rights Reserved