Home > Web Front-end > JS Tutorial > Instructions for using the buffer.length method in node.js_node.js

Instructions for using the buffer.length method in node.js_node.js

WBOY
Release: 2016-05-16 16:27:18
Original
1869 people have browsed it

Method description:

This method will return the length of the buffer object.

Grammar:

Copy code The code is as follows:

buffer.length

Receive parameters:

None

Example:

Copy code The code is as follows:

buf = new Buffer(1234);
console.log(buf.length);
buf.write("some string", 0, "ascii");
console.log(buf.length);
// 1234
// 1234
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template