class KeyValue extends Entry{ constructor(slot,_key,_value){ if(!(slot instanceof Slot && _key instanceof IoTString && _value instanceof IoTString)){ throw new Error('Argument error '); } super(slot); this.key = _key; this.value = _value; } getKey(){ return this.key; } getValue(){ return this.value; } decode(slot,bb){ if(!(slot instanceof Slot && bb instanceof ByteBuffer)){ throw new Error('Argument error'); } var keylength = bb.getByte(); var valuelength = bb.getByte(); var key = new Uint8Array(keylength); var value = new Uint8Array(valuelength); var keystring = ''; for(var i =0 ;i