写入指定的字节数组

@param {ArrayBuffer} value 写入值
@param {number=} length 数组长度
@param {number=} offset 起始偏移
@return {this}
506745
function (value, length, offset) {

                length = length || value.byteLength || value.length;
                var i;

                if (!length) {
                    return this;
                }

                if (undefined === offset) {
                    offset = this.offset;
                }

                if (length < 0 || offset + length > this.length) {
                    error.raise(10002, this.length, offset + length);
                }

                if (value instanceof ArrayBuffer) {
                    var view = new DataView(value, 0, length);
                    var littleEndian = this.littleEndian;

                    for (i = 0; i < length; ++i) {
                        this.view.setUint8(offset + i, view.getUint8(i, littleEndian), littleEndian);
                    }
                }
                else {
                    for (i = 0; i < length; ++i) {
                        this.view.setUint8(offset + i, value[i], littleEndian);
                    }
                }

                this.offset = offset + length;

                return this;
            }
513434
public AsciiSequenceView wrap(final DirectBuffer buffer, final int offset, final int length)
    {
        this.buffer = buffer;
        this.offset = offset;
        this.length = length;

        return this;
    }
335915
function (value) {
        let val = parseInt(value, 10);
        if (isNaN(val)) {
            return false;
        }
        return (val + '').length === value.length;
    }
525910
def update_value(self, offset, value):
        

        if offset + len(value) > self.total_size:
            return Error.INPUT_BUFFER_TOO_LONG

        if len(self.current_value) < offset:
            self.current_value += bytearray(offset - len(self.current_value))
        if len(self.current_value) > offset:
            self.current_value = self.current_value[:offset]

        self.current_value += bytearray(value)
        return 0
776032
function(value)
    {
        var result = {};

        var t = typeof(value);
        //primitives are kept as such
        if (t == "number" || t == "string" || t == "boolean" || t == null || t == undefined)
        {
            result = value;
        }
        else if (value instanceof Array)
        {
            //arrays are serializesd recursively
            result = [];
            for (var i = 0; i < value.length; i++)
            {
                result[i] = this.serialize(value[i]);
            }
        }
        else if (t == "function")
        {
            //js functions are assigned an ID and stored in the local cache 
            result.type = FABridge.TYPE_JSFUNCTION;
            result.value = this.getFunctionID(value);
        }
        else if (value instanceof ASProxy)
        {
            result.type = FABridge.TYPE_ASINSTANCE;
            result.value = value.fb_instance_id;
        }
        else
        {
            result.type = FABridge.TYPE_ANONYMOUS;
            result.value = value;
        }

        return result;
    }
689380
function setrange(key, offset, value, req) {
  var val = this.getKey(key, req)
    , str = typeof val === 'string'
    , len
    , buf;
  if(val && !(val instanceof Buffer)) val = new Buffer(val);
  if(typeof val === 'number') val = new Buffer('' + val);
  if(typeof value === 'string') {
    value = new Buffer(value);
  }
  offset = parseInt(offset);
  if(!val) {
    val = new Buffer('');
  }

  // zero pad where necessary
  while(val.length < offset) {
    val = Buffer.concat([val, new Buffer([0])], val.length + 1);
  }

  // slice the buffer to offset
  if(offset < val.length) {
    val = val.slice(0, offset);
  }

  val = Buffer.concat([val, value], val.length + value.length);

  // was a string, put back as a string
  if(str) {
    val = '' + val;
    len = Buffer.byteLength(val);
  // was a buffer
  }else{
    len = val.length;
  }
  this.setKey(key, val, undefined, undefined, undefined, req);
  return len;
}
128171
function (offset) {
                if (undefined === offset) {
                    this.offset = 0;
                }

                if (offset < 0 || offset > this.length) {
                    error.raise(10002, this.length, offset);
                }

                this._offset = this.offset;
                this.offset = offset;

                return this;
            }
594163
public void addInt(int value) {
        data[endOffset] = value;
        endOffset++;
        
        // Grow the buffer if needed
        if (endOffset == data.length)
            resize();
        
    }
283179
public static void putLongLE(final byte[] array, final int offset, final long value) {
    array[offset    ] = (byte) (value       );
    array[offset + 1] = (byte) (value >>>  8);
    array[offset + 2] = (byte) (value >>> 16);
    array[offset + 3] = (byte) (value >>> 24);
    array[offset + 4] = (byte) (value >>> 32);
    array[offset + 5] = (byte) (value >>> 40);
    array[offset + 6] = (byte) (value >>> 48);
    array[offset + 7] = (byte) (value >>> 56);
  }
645093
function( value ) {
      var result = (value === undefined || value === null || value === "" || (value.hasOwnProperty("length") && value.length == 0));

      return result;
    }
164455
function padValue(value, length) {
  assert.strictEqual(typeof value, 'string');
  assert.strictEqual(typeof length, 'number');

  var result = value;

  while (result.length < length) {
    result = '0' + result;
  }

  return result;
}
714196
function( array, offset ){
    var gl = this.gl;
    gl.bindBuffer(    TGT, this.buffer );
    gl.bufferSubData( TGT, offset, array );
    gl.bindBuffer(    TGT, null );
  }
708511
function (buffer, start, length) {
  /*jshint bitwise:false*/

  var isNested = buffer instanceof ByteBuffer;

  this.buffer = isNested ? buffer.buffer : buffer;
  this.start = (start || 0) + (isNested ? buffer.start : 0);
  this.length = length || (this.buffer.length - this.start);
  this.offset = 0;

}
191983
function writeVarInt (buffer, number, offset) {
  varuint.encode(number, buffer, offset);
  return varuint.encode.bytes;
}
599429
private static void writeInt(byte[] buffer, int offset, int value) {
    buffer[offset    ] = (byte) (value >> 24);
    buffer[offset + 1] = (byte) (value >> 16);
    buffer[offset + 2] = (byte) (value >> 8);
    buffer[offset + 3] = (byte) value;
  }
808944
public void setShort(int offset, int value)
  {
    byte []code = getCode();
    
    code[offset + 0]  = (byte) (value >> 8);
    code[offset + 1]  = (byte) (value);
  }
1338096
function (offset, length) {

                if (arguments.length === 1) {
                    length = arguments[0];
                    offset = this.offset;
                }

                if (length < 0 || offset + length > this.length) {
                    error.raise(10001, this.length, offset + length);
                }

                var buffer = [];
                for (var i = 0; i < length; ++i) {
                    buffer.push(this.view.getUint8(offset + i));
                }

                this.offset = offset + length;
                return buffer;
            }