node.js中的buffer.length方法使用说明

时间:2014-12-14    点击:100   

方法说明:

该方法将返回buffer对象的长度。

语法:

复制代码 代码如下:

buffer.length

接收参数:

例子:

复制代码 代码如下:

buf = new Buffer(1234);
console.log(buf.length);
buf.write("some string", 0, "ascii");
console.log(buf.length);
// 1234
// 1234

node.js中的console.trace方法使用说明
node.js中的http.response.removeHeader方法使用说明
node.js中的http.request方法使用说明
node.js中的buffer.copy方法使用说明
node.js中的buffer.fill方法使用说明
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved