Method description:
Fill the formulated data into the buffer.
grammar:
The code copy is as follows:
buffer.fill(value, [offset], [end])
Receive parameters:
value The data to be populated
Offet start position of filling data, not specified as 0 by default
end The end position of the fill data, does not specify the length of the default buffer.
example:
The code copy is as follows:
//In Example 1, the start and end position of the fill content is not specified.
var b = new Buffer(50);
b.fill("h");
//In Example 2, the start and end positions of the fill content are specified.
var b = new Buffer(50);
var len = b.length;
b.fill("h" , len-1 , len);