Dart DocumentationbsonBsonInt

BsonInt class

class BsonInt extends BsonObject{
 int data;
 BsonInt(this.data);
 get value=>data;
 byteLength()=>4;
 int get typeByte => _BSON_DATA_INT;
 packValue(BsonBinary buffer){
    buffer.writeInt(data);
 }
 unpackValue(BsonBinary buffer){
    data = buffer.readInt32();
 }
}

Extends

BsonObject > BsonInt

Constructors

new BsonInt(int data) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
BsonInt(this.data);

Properties

int data #

int data

final int typeByte #

int get typeByte => _BSON_DATA_INT;

final value #

get value=>data;

Methods

dynamic byteLength() #

byteLength()=>4;

dynamic packElement(String name, buffer) #

inherited from BsonObject
packElement(String name, var buffer){
 buffer.writeByte(typeByte);
 if (name != null){
   new BsonCString(name).packValue(buffer);
 }
 packValue(buffer);
}

dynamic packValue(BsonBinary buffer) #

packValue(BsonBinary buffer){
  buffer.writeInt(data);
}

_ElementPair unpackElement(buffer) #

inherited from BsonObject
_ElementPair unpackElement(buffer){
 _ElementPair result = new _ElementPair();
 result.name = buffer.readCString();
 unpackValue(buffer);
 result.value = value;
 return result;
}

dynamic unpackValue(BsonBinary buffer) #

unpackValue(BsonBinary buffer){
  data = buffer.readInt32();
}