本文整理了Java中org.littleshoot.mina.common.ByteBuffer.getUnsigned()
方法的一些代码示例,展示了ByteBuffer.getUnsigned()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuffer.getUnsigned()
方法的具体详情如下:
包路径:org.littleshoot.mina.common.ByteBuffer
类名称:ByteBuffer
方法名:getUnsigned
[英]Reads one unsigned byte as a short integer.
[中]将一个无符号字节读取为短整数。
代码示例来源:origin: org.littleshoot/mina-port
public short getUnsigned() {
return buf.getUnsigned();
}
代码示例来源:origin: org.littleshoot/stun-stack
try
final int firstByte = in.getUnsigned();
代码示例来源:origin: org.littleshoot/mina-port
switch (prefixLength) {
case 1:
dataLength = getUnsigned(position());
break;
case 2:
代码示例来源:origin: org.littleshoot/stun-stack
try
final int firstByte = in.getUnsigned();
代码示例来源:origin: org.littleshoot/mina-port
fieldSize = getUnsigned();
break;
case 2:
代码示例来源:origin: org.littleshoot/mina-port
public short getUnsigned(int index) {
return buf.getUnsigned(index);
}
代码示例来源:origin: org.littleshoot/stun-stack
final short errorClass = body.getUnsigned();
final short errorNumber = body.getUnsigned();
final String reasonPhrase = MinaUtils.getString(body);
return new ErrorCodeAttribute(errorClass, errorNumber, reasonPhrase);
代码示例来源:origin: org.littleshoot/tcp-framing
public DecodingState decode(final ByteBuffer in,
final ProtocolDecoderOutput out) throws Exception
{
in.mark();
final int firstByte = in.getUnsigned();
// Reset the buffer position.
in.reset();
final int masked = firstByte & 0xc0;
if (masked > 0)
{
return this.m_stateFactory.newState();
}
else
{
return null;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!