org.littleshoot.mina.common.ByteBuffer.getUnsignedShort()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(130)

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

ByteBuffer.getUnsignedShort介绍

[英]Reads two bytes unsigned integer.
[中]读取两个字节的无符号整数。

代码示例

代码示例来源:origin: org.littleshoot/mina-port

public int getUnsignedShort() {
  return buf.getUnsignedShort();
}

代码示例来源:origin: org.littleshoot/mina-port

public int getUnsignedShort(int index) {
  return buf.getUnsignedShort(index);
}

代码示例来源:origin: org.littleshoot/mina-util

public DecodingState decode(final ByteBuffer in, 
  final ProtocolDecoderOutput out) throws Exception
  {
  if (in.remaining() > 1)
    {
    final int decoded = in.getUnsignedShort();
    return finishDecode(decoded, out);
    }
  else
    {
    return this;
    }
  }

代码示例来源:origin: org.littleshoot/stun-stack

final int port = body.getUnsignedShort();

代码示例来源:origin: org.littleshoot/stun-stack

final ByteBuffer buf)
final int typeInt = buf.getUnsignedShort();
final StunAttributeType type = StunAttributeType.toType(typeInt);
final int length = buf.getUnsignedShort();

代码示例来源:origin: org.littleshoot/mina-port

break;
case 2:
  fieldSize = getUnsignedShort();
  break;
case 4:

代码示例来源:origin: org.littleshoot/mina-port

break;
case 2:
  dataLength = getUnsignedShort(position());
  break;
case 4:

相关文章