io.netty.buffer.ByteBuf.getUnsignedInt()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(377)

本文整理了Java中io.netty.buffer.ByteBuf.getUnsignedInt()方法的一些代码示例,展示了ByteBuf.getUnsignedInt()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuf.getUnsignedInt()方法的具体详情如下:
包路径:io.netty.buffer.ByteBuf
类名称:ByteBuf
方法名:getUnsignedInt

ByteBuf.getUnsignedInt介绍

[英]Gets an unsigned 32-bit integer at the specified absolute indexin this buffer. This method does not modify readerIndex or writerIndex of this buffer.
[中]获取此缓冲区中指定绝对索引处的无符号32位整数。此方法不修改此缓冲区的readerIndex或writerIndex。

代码示例

代码示例来源:origin: netty/netty

private static long compareUintBigEndian(
    ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement) {
  for (int aEnd = aIndex + uintCountIncrement; aIndex < aEnd; aIndex += 4, bIndex += 4) {
    long comp = bufferA.getUnsignedInt(aIndex) - bufferB.getUnsignedInt(bIndex);
    if (comp != 0) {
      return comp;
    }
  }
  return 0;
}

代码示例来源:origin: netty/netty

private static long compareUintBigEndianB(
    ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement) {
  for (int aEnd = aIndex + uintCountIncrement; aIndex < aEnd; aIndex += 4, bIndex += 4) {
    long comp =  bufferA.getUnsignedIntLE(aIndex) - bufferB.getUnsignedInt(bIndex);
    if (comp != 0) {
      return comp;
    }
  }
  return 0;
}

代码示例来源:origin: netty/netty

private static long compareUintBigEndianA(
    ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement) {
  for (int aEnd = aIndex + uintCountIncrement; aIndex < aEnd; aIndex += 4, bIndex += 4) {
    long comp =  bufferA.getUnsignedInt(aIndex) - bufferB.getUnsignedIntLE(bIndex);
    if (comp != 0) {
      return comp;
    }
  }
  return 0;
}

代码示例来源:origin: netty/netty

@Override
public long getUnsignedInt(int index) {
  return buf.getUnsignedInt(index);
}

代码示例来源:origin: redisson/redisson

private static long compareUintBigEndianA(
    ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement) {
  for (int aEnd = aIndex + uintCountIncrement; aIndex < aEnd; aIndex += 4, bIndex += 4) {
    long comp =  bufferA.getUnsignedInt(aIndex) - bufferB.getUnsignedIntLE(bIndex);
    if (comp != 0) {
      return comp;
    }
  }
  return 0;
}

代码示例来源:origin: redisson/redisson

private static long compareUintBigEndian(
    ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement) {
  for (int aEnd = aIndex + uintCountIncrement; aIndex < aEnd; aIndex += 4, bIndex += 4) {
    long comp = bufferA.getUnsignedInt(aIndex) - bufferB.getUnsignedInt(bIndex);
    if (comp != 0) {
      return comp;
    }
  }
  return 0;
}

代码示例来源:origin: redisson/redisson

private static long compareUintBigEndianB(
    ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement) {
  for (int aEnd = aIndex + uintCountIncrement; aIndex < aEnd; aIndex += 4, bIndex += 4) {
    long comp =  bufferA.getUnsignedIntLE(aIndex) - bufferB.getUnsignedInt(bIndex);
    if (comp != 0) {
      return comp;
    }
  }
  return 0;
}

代码示例来源:origin: redisson/redisson

@Override
public long getUnsignedInt(int index) {
  return buf.getUnsignedInt(index);
}

代码示例来源:origin: wildfly/wildfly

private static long compareUintBigEndianB(
    ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement) {
  for (int aEnd = aIndex + uintCountIncrement; aIndex < aEnd; aIndex += 4, bIndex += 4) {
    long comp =  bufferA.getUnsignedIntLE(aIndex) - bufferB.getUnsignedInt(bIndex);
    if (comp != 0) {
      return comp;
    }
  }
  return 0;
}

代码示例来源:origin: eclipse-vertx/vert.x

public long getUnsignedInt(int pos) {
 return buffer.getUnsignedInt(pos);
}

代码示例来源:origin: wildfly/wildfly

private static long compareUintBigEndianA(
    ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement) {
  for (int aEnd = aIndex + uintCountIncrement; aIndex < aEnd; aIndex += 4, bIndex += 4) {
    long comp =  bufferA.getUnsignedInt(aIndex) - bufferB.getUnsignedIntLE(bIndex);
    if (comp != 0) {
      return comp;
    }
  }
  return 0;
}

代码示例来源:origin: wildfly/wildfly

private static long compareUintBigEndian(
    ByteBuf bufferA, ByteBuf bufferB, int aIndex, int bIndex, int uintCountIncrement) {
  for (int aEnd = aIndex + uintCountIncrement; aIndex < aEnd; aIndex += 4, bIndex += 4) {
    long comp = bufferA.getUnsignedInt(aIndex) - bufferB.getUnsignedInt(bIndex);
    if (comp != 0) {
      return comp;
    }
  }
  return 0;
}

代码示例来源:origin: wildfly/wildfly

@Override
public long getUnsignedInt(final int index) {
 return buffer.getUnsignedInt(index);
}

代码示例来源:origin: wildfly/wildfly

@Override
public long getUnsignedInt(int index) {
  return buf.getUnsignedInt(index);
}

代码示例来源:origin: micronaut-projects/micronaut-core

@Override
public long getUnsignedInt(int index) {
  return byteBuf.getUnsignedInt(index);
}

代码示例来源:origin: netty/netty

@Override
public long getUnsignedInt(int index) {
  checkIndex(index, 4);
  return buffer.getUnsignedInt(index);
}

代码示例来源:origin: redisson/redisson

@Override
public long getUnsignedInt(int index) {
  checkIndex(index, 4);
  return buffer.getUnsignedInt(index);
}

代码示例来源:origin: wildfly/wildfly

@Override
public long getUnsignedInt(int index) {
  checkIndex(index, 4);
  return buffer.getUnsignedInt(index);
}

代码示例来源:origin: Graylog2/graylog2-server

public static long getUnsignedInteger(final ByteBuf buf, final int offset, final int length) {
  switch (length) {
    case 1:
      return buf.getUnsignedByte(offset);
    case 2:
      return buf.getUnsignedShort(offset);
    case 3:
      return buf.getUnsignedMedium(offset);
    case 4:
      return buf.getUnsignedInt(offset);
    case 8:
      return buf.getLong(offset) & 0x00000000ffffffffL;
    default:
      return 0L;
  }
}

代码示例来源:origin: netty/netty

break;
case 4:
  frameLength = buf.getUnsignedInt(offset);
  break;
case 8:

相关文章

ByteBuf类方法