toBuffer(len) {
        precon.opt_positiveInteger(len, 'len');

        const _ = this;
        const newBuffer = Buffer.alloc(len ? Math.min(len, _._buffer.length) : _._dataLen);
        _._buffer.copy(newBuffer);
        return newBuffer;
    }
/**
     * Create a new Buffer instance with a copy of the data in the BosDeserializeBuffer.
     *
     * @param [len] {number} The length of the Buffer to return. Default is the length of the data.
     * @returns {Buffer}
     */
Create a new Buffer instance with a copy of the data in the BosDeserializeBuffer.
@param [len] {number} The length of the Buffer to return. Default is the length of the data.
@returns {Buffer}
Create a new Buffer instance with a copy of the data in the BosDeserializeBuffer . @param [ len ] { number } The length of the Buffer to return . Default is the length of the data . @returns { Buffer }
toBuffer(len) {
        precon.opt_positiveInteger(len, 'len');
        const _ = this;
        const newBuffer = Buffer.alloc(len ? Math.min(len, _._buffer.length) : _._dataLen);
        _._buffer.copy(newBuffer);
        return newBuffer;
    }
toBuffer ( len ) { precon . opt_positiveInteger ( len , 'len' ) ; const _ = this ; const newBuffer = Buffer . alloc ( len ? Math . min ( len , _ . _buffer . length ) : _ . _dataLen ) ; _ . _buffer . copy ( newBuffer ) ; return newBuffer ; }
Create a new Buffer instance with a copy of the data in the BosDeserializeBuffer.
Create a new Buffer instance with a copy of the data in the BosDeserializeBuffer .