本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}