class ByteBufBsonDocument extends BsonDocument implements java.lang.Cloneable
| Modifier and Type | Class and Description |
|---|---|
private static interface |
ByteBufBsonDocument.Finder<T> |
| Modifier and Type | Field and Description |
|---|---|
private ByteBuf |
byteBuf |
private static CodecRegistry |
REGISTRY |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
ByteBufBsonDocument(ByteBuf byteBuf) |
| Modifier and Type | Method and Description |
|---|---|
BsonDocument |
append(java.lang.String key,
BsonValue value)
Put the given key and value into this document, and return the document.
|
void |
clear() |
BsonDocument |
clone() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
(package private) static java.util.List<ByteBufBsonDocument> |
create(ByteBufferBsonOutput bsonOutput,
int startPosition) |
(package private) static java.util.List<ByteBufBsonDocument> |
create(ResponseBuffers responseBuffers) |
(package private) static ByteBufBsonDocument |
createOne(ByteBufferBsonOutput bsonOutput,
int startPosition) |
private BsonValue |
deserializeBsonValue(BsonReader bsonReader) |
java.util.Set<java.util.Map.Entry<java.lang.String,BsonValue>> |
entrySet() |
boolean |
equals(java.lang.Object o) |
private <T> T |
findInDocument(ByteBufBsonDocument.Finder<T> finder) |
BsonValue |
get(java.lang.Object key) |
java.lang.String |
getFirstKey()
Gets the first key in this document, or null if the document is empty.
|
int |
hashCode() |
boolean |
isEmpty() |
java.util.Set<java.lang.String> |
keySet() |
BsonValue |
put(java.lang.String key,
BsonValue value) |
void |
putAll(java.util.Map<? extends java.lang.String,? extends BsonValue> m) |
private void |
readObject(java.io.ObjectInputStream stream) |
BsonValue |
remove(java.lang.Object key) |
int |
size() |
private BsonDocument |
toBsonDocument() |
java.lang.String |
toJson()
Gets a JSON representation of this document using the default settings of
JsonWriterSettings. |
java.lang.String |
toJson(JsonWriterSettings settings)
Gets a JSON representation of this document using the given
JsonWriterSettings. |
java.util.Collection<BsonValue> |
values() |
private java.lang.Object |
writeReplace() |
get, getArray, getArray, getBinary, getBinary, getBoolean, getBoolean, getBsonType, getDateTime, getDateTime, getDecimal128, getDecimal128, getDocument, getDocument, getDouble, getDouble, getInt32, getInt32, getInt64, getInt64, getNumber, getNumber, getObjectId, getObjectId, getRegularExpression, getRegularExpression, getString, getString, getTimestamp, getTimestamp, isArray, isBinary, isBoolean, isDateTime, isDecimal128, isDocument, isDouble, isInt32, isInt64, isNull, isNumber, isObjectId, isString, isTimestamp, parse, toBsonDocument, toStringasArray, asBinary, asBoolean, asDateTime, asDBPointer, asDecimal128, asDocument, asDouble, asInt32, asInt64, asJavaScript, asJavaScriptWithScope, asNumber, asObjectId, asRegularExpression, asString, asSymbol, asTimestamp, isArray, isBinary, isBoolean, isDateTime, isDBPointer, isDecimal128, isDocument, isDouble, isInt32, isInt64, isJavaScript, isJavaScriptWithScope, isNull, isNumber, isObjectId, isRegularExpression, isString, isSymbol, isTimestampprivate static final long serialVersionUID
private static final CodecRegistry REGISTRY
private final transient ByteBuf byteBuf
ByteBufBsonDocument(ByteBuf byteBuf)
static java.util.List<ByteBufBsonDocument> create(ResponseBuffers responseBuffers)
static ByteBufBsonDocument createOne(ByteBufferBsonOutput bsonOutput, int startPosition)
static java.util.List<ByteBufBsonDocument> create(ByteBufferBsonOutput bsonOutput, int startPosition)
public void clear()
clear in interface java.util.Map<java.lang.String,BsonValue>clear in class BsonDocumentpublic BsonValue put(java.lang.String key, BsonValue value)
put in interface java.util.Map<java.lang.String,BsonValue>put in class BsonDocumentpublic BsonDocument append(java.lang.String key, BsonValue value)
BsonDocumentappend in class BsonDocumentkey - the keyvalue - the valuepublic void putAll(java.util.Map<? extends java.lang.String,? extends BsonValue> m)
putAll in interface java.util.Map<java.lang.String,BsonValue>putAll in class BsonDocumentpublic BsonValue remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.String,BsonValue>remove in class BsonDocumentpublic boolean isEmpty()
isEmpty in interface java.util.Map<java.lang.String,BsonValue>isEmpty in class BsonDocumentpublic int size()
size in interface java.util.Map<java.lang.String,BsonValue>size in class BsonDocumentpublic java.util.Set<java.util.Map.Entry<java.lang.String,BsonValue>> entrySet()
entrySet in interface java.util.Map<java.lang.String,BsonValue>entrySet in class BsonDocumentpublic java.util.Collection<BsonValue> values()
values in interface java.util.Map<java.lang.String,BsonValue>values in class BsonDocumentpublic java.util.Set<java.lang.String> keySet()
keySet in interface java.util.Map<java.lang.String,BsonValue>keySet in class BsonDocumentpublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.String,BsonValue>containsKey in class BsonDocumentpublic boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.String,BsonValue>containsValue in class BsonDocumentpublic BsonValue get(java.lang.Object key)
get in interface java.util.Map<java.lang.String,BsonValue>get in class BsonDocumentpublic java.lang.String toJson()
BsonDocumentJsonWriterSettings.toJson in class BsonDocumentJsonWriterSettingspublic java.lang.String toJson(JsonWriterSettings settings)
BsonDocumentJsonWriterSettings.toJson in class BsonDocumentsettings - the JSON writer settingspublic java.lang.String getFirstKey()
private <T> T findInDocument(ByteBufBsonDocument.Finder<T> finder)
public BsonDocument clone()
clone in class BsonDocumentpublic boolean equals(java.lang.Object o)
equals in interface java.util.Map<java.lang.String,BsonValue>equals in class BsonDocumentpublic int hashCode()
hashCode in interface java.util.Map<java.lang.String,BsonValue>hashCode in class BsonDocumentprivate BsonDocument toBsonDocument()
private BsonValue deserializeBsonValue(BsonReader bsonReader)
private java.lang.Object writeReplace()
private void readObject(java.io.ObjectInputStream stream)
throws java.io.InvalidObjectException
java.io.InvalidObjectException