Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

read buffer nodejs

// if the buffers contain text
buffer.toString(encoding) // encoding = 'utf-8'

// if you know how many bytes the buffer contains then
buffer.toString(encoding, 0, numberOfBytes) // numberOfBytes = 12
Source by nodejs.org #
 
PREVIOUS NEXT
Tagged: #read #buffer #nodejs
ADD COMMENT
Topic
Name
5+4 =