• offset {Number} 0

    				<li>noAssert {Boolean} 默认:false</li>
    
    				<li>返回:{Number}</li>
    </ul>

    从该 Buffer 指定的带有特定尾数格式(readInt16BE() 返回一个较大的尾数,readInt16LE() 返回一个较小的尾数)的 offset 位置开始读取一个16位整数值。

    设置 noAssert 为 true ,将跳过对 offset 的验证。这将允许 offset 超出缓冲区的末尾。

    从 Buffer 里读取的整数数值会被解释执行为有符号的2的补码值。

    const buf = Buffer.from([1, -2, 3, 4]);
    
    buf.readInt16BE();
    // returns 510
    buf.readInt16LE(1);
    // returns 1022

    buf.readInt16LE函数详解的更多相关文章

    1. buf.writeUInt8()函数详解

      buf.writeUInt8(value, offset[, noAssert]) value {Number} 需要被写入到 Buffer 的字节 offset {Number} 0 <= o ...

    2. buf.writeUIntBE()函数详解

      buf.writeUIntBE(value, offset, byteLength[, noAssert]) buf.writeUIntLE(value, offset, byteLength[, n ...

    3. buf.writeInt32BE()函数详解

      buf.writeInt32BE(value, offset[, noAssert]) buf.writeInt32LE(value, offset[, noAssert]) value {Numbe ...

    4. buf.writeInt16BE()函数详解

      buf.writeInt16BE(value, offset[, noAssert]) buf.writeInt16LE(value, offset[, noAssert]) value {Numbe ...

    5. buf.writeInt8()函数详解

      buf.writeInt8(value, offset[, noAssert]) value {Number} 需要被写入到 Buffer 的字节 offset {Number} 0 <= of ...

    6. buf.writeDoubleBE()函数详解

      buf.writeDoubleBE(value, offset[, noAssert]) buf.writeDoubleLE(value, offset[, noAssert]) value {Num ...

    7. buf.writeFloatBE()函数详解

      buf.writeFloatBE(value, offset[, noAssert]) buf.writeFloatLE(value, offset[, noAssert]) value {Numbe ...

    8. buf.writeIntBE()函数详解

      buf.writeIntBE(value, offset, byteLength[, noAssert]) buf.writeIntLE(value, offset, byteLength[, noA ...

    9. buf.readUInt32BE()函数详解

      buf.readUInt32BE(offset[, noAssert]) buf.readUInt32LE(offset[, noAssert]) offset {Number} 0 noAssert ...

    随机推荐

    1. poj3176-Cow Bowling【dp】

      The cows don't use actual bowling balls when they go bowling. They each take a number (in the range ...

    2. MySQL中的分页操作结合python

      mysql中的分页操作结合python --分页: --方式1: ;-- 读取十行 , --从第十行读取 往后再读十行 --方式2: offset ; --从第二十行开始读取10行 -- 结合pyth ...

    3. Maven学习总结(6)——Maven与Eclipse整合

      Maven学习总结(六)--Maven与Eclipse整合 一.安装Maven插件 下载下来的maven插件如下图所示:,插件存放的路径是:E:/MavenProject/Maven2EclipseP ...

    4. 4、ceph-deploy之配置使用对象存储

      从firefly(v0.80)版本开始,ceph存储显著的简化了安装和配置Ceph Object Gateway, Gateway进程嵌入到Civetweb,所以你需要安装一个web服务,或者配置Fa ...

    5. 64位CentOS6.5下Eclipse用Java连接mysql

      1.到官网上下载jdbc驱动,我下载的是mysql-connector-java-5.0.8.tar.gz 2.解压下载到的文件 tar -zxvf mysql-connector-java-5.0. ...

    6. [bzoj3378][Usaco2004 Open]MooFest 狂欢节_树状数组

      MooFest 狂欢节 bzoj-3378 Usaco-2004 Open 题目大意:给定一个n个数的a序列,每两个数之间有一个距离,两个点之间的权值为$max(a[i],a[j])*dis(i,j) ...

    7. 51Nod——T 1109 01组成的N的倍数

      https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1109 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 ...

    8. HDU 5016 Mart Master II (树上点分治)

      题目地址:pid=5016">HDU 5016 先两遍DFS预处理出每一个点距近期的基站的距离与基站的编号. 然后找重心.求出每一个点距重心的距离.然后依据dis[x]+dis[y] ...

    9. CF 447A(DZY Loves Hash-简单判重)

      A. DZY Loves Hash time limit per test 1 second memory limit per test 256 megabytes input standard in ...

    10. 从头认识java-15.2 Collection的经常用法(2)-注意点

      上一章节我们讲述了Collection的经常用法.还有之前的章节我们介绍了Collection的addAll方法,这一章节我们介绍一下它的注意点. 注意点就是,在经常用法里面,基本都是可选操作. 什么 ...