当前位置: 首页>>代码示例>>Java>>正文


Java DrillBuf.checkBytes方法代码示例

本文整理汇总了Java中io.netty.buffer.DrillBuf.checkBytes方法的典型用法代码示例。如果您正苦于以下问题:Java DrillBuf.checkBytes方法的具体用法?Java DrillBuf.checkBytes怎么用?Java DrillBuf.checkBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.netty.buffer.DrillBuf的用法示例。


在下文中一共展示了DrillBuf.checkBytes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hash64

import io.netty.buffer.DrillBuf; //导入方法依赖的package包/类
public static long hash64(int start, int end, DrillBuf buffer, long seed){
  if(BOUNDS_CHECKING_ENABLED){
    buffer.checkBytes(start, end);
  }

  long s = buffer.memoryAddress() + start;
  long e = buffer.memoryAddress() + end;

  return hash64bytes(s, e, seed);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:11,代码来源:XXHash.java

示例2: getDate

import io.netty.buffer.DrillBuf; //导入方法依赖的package包/类
public static long getDate(DrillBuf buf, int start, int end){
  if(BOUNDS_CHECKING_ENABLED){
    buf.checkBytes(start, end);
  }
  return memGetDate(buf.memoryAddress(), start, end);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:7,代码来源:StringFunctionHelpers.java

示例3: equal

import io.netty.buffer.DrillBuf; //导入方法依赖的package包/类
/**
 * Helper function to check for equality of bytes in two DrillBuffers
 *
 * @param left Left DrillBuf for comparison
 * @param lStart start offset in the buffer
 * @param lEnd end offset in the buffer
 * @param right Right DrillBuf for comparison
 * @param rStart start offset in the buffer
 * @param rEnd end offset in the buffer
 * @return 1 if left input is greater, -1 if left input is smaller, 0 otherwise
 */
public static final int equal(final DrillBuf left, int lStart, int lEnd, final DrillBuf right, int rStart, int rEnd){
  if(BOUNDS_CHECKING_ENABLED){
    left.checkBytes(lStart, lEnd);
    right.checkBytes(rStart, rEnd);
  }
  return memEqual(left.memoryAddress(), lStart, lEnd, right.memoryAddress(), rStart, rEnd);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:19,代码来源:ByteFunctionHelpers.java

示例4: compare

import io.netty.buffer.DrillBuf; //导入方法依赖的package包/类
/**
 * Helper function to compare a set of bytes in two DrillBuffers.
 *
 * Function will check data before completing in the case that
 *
 * @param left Left DrillBuf to compare
 * @param lStart start offset in the buffer
 * @param lEnd end offset in the buffer
 * @param right Right DrillBuf to compare
 * @param rStart start offset in the buffer
 * @param rEnd end offset in the buffer
 * @return 1 if left input is greater, -1 if left input is smaller, 0 otherwise
 */
public static final int compare(final DrillBuf left, int lStart, int lEnd, final DrillBuf right, int rStart, int rEnd){
  if(BOUNDS_CHECKING_ENABLED){
    left.checkBytes(lStart, lEnd);
    right.checkBytes(rStart, rEnd);
  }
  return memcmp(left.memoryAddress(), lStart, lEnd, right.memoryAddress(), rStart, rEnd);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:21,代码来源:ByteFunctionHelpers.java


注:本文中的io.netty.buffer.DrillBuf.checkBytes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。