本文整理了Java中org.littleshoot.mina.common.ByteBuffer.getUnsignedShort()
方法的一些代码示例,展示了ByteBuffer.getUnsignedShort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuffer.getUnsignedShort()
方法的具体详情如下:
包路径:org.littleshoot.mina.common.ByteBuffer
类名称: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:
内容来源于网络,如有侵权,请联系作者删除!