Package com.mongodb
Class LazyDBObject
java.lang.Object
org.bson.LazyBSONObject
com.mongodb.LazyDBObject
- All Implemented Interfaces:
- DBObject,- BSONObject
An immutable 
DBObject backed by a byte buffer that lazily provides keys and values on request. This is useful for transferring
 BSON documents between servers when you don't want to pay the performance penalty of encoding or decoding them fully.- 
Constructor SummaryConstructorsConstructorDescriptionLazyDBObject(byte[] bytes, int offset, LazyBSONCallback callback) Construct an instance.LazyDBObject(byte[] bytes, LazyBSONCallback callback) Construct an instance.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanvoidtoString()Returns a JSON serialization of this objectMethods inherited from class org.bson.LazyBSONObjectcontainsField, entrySet, equals, get, getBSONSize, getBytes, getOffset, hashCode, isEmpty, keySet, pipe, put, putAll, putAll, removeField, toMapMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bson.BSONObjectcontainsField, get, keySet, put, putAll, putAll, removeField, toMap
- 
Constructor Details- 
LazyDBObjectConstruct an instance.- Parameters:
- bytes- the raw bytes
- callback- the callback to use to construct nested values
 
- 
LazyDBObjectConstruct an instance.- Parameters:
- bytes- the raw bytes
- offset- the offset into the raw bytes
- callback- the callback to use to construct nested values
 
 
- 
- 
Method Details- 
markAsPartialObjectpublic void markAsPartialObject()- Specified by:
- markAsPartialObjectin interface- DBObject
 
- 
isPartialObjectpublic boolean isPartialObject()- Specified by:
- isPartialObjectin interface- DBObject
 
- 
toStringReturns a JSON serialization of this object
 
-