本文整理汇总了C#中ByteBuffer.readUnsignedShort方法的典型用法代码示例。如果您正苦于以下问题:C# ByteBuffer.readUnsignedShort方法的具体用法?C# ByteBuffer.readUnsignedShort怎么用?C# ByteBuffer.readUnsignedShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ByteBuffer
的用法示例。
在下文中一共展示了ByteBuffer.readUnsignedShort方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bytesRead
public override void bytesRead(ByteBuffer data)
{
base.bytesRead(data);
if (this.isTag(base._tag))
{
data.position -= 3;
int len = data.readUnsignedShort() - 1;
data.readByte();
uint position = (uint) data.position;
this._byteArray.clear();
data.readBytes(this._byteArray, 0, len);
this._value = this._byteArray.readUTFBytes(len);
}
}
示例2: bytesReadValue
public object bytesReadValue(ByteBuffer data)
{
uint num = (uint) data.readUnsignedShort();
uint position = (uint) data.position;
int u = data.readUnsignedByte() ;
Log.Info (u);
if (u == 0x83)
//if (_cmd=="")
{
//data.position = (int) position;
return ByteKitClient.complexAnalyse(data);
}
/*if (u == 0x68||u == 0x68)
//if (_cmd=="")
{
data.position = (int) position;
return ByteKit.complexAnalyse(data);
}*/
data.position = (int) position;
return ByteKitClient.simpleAnalyse(data);
//data.position = (int) position;
//return ByteKit.complexAnalyse(data);
}
示例3: bytesReadValue
public object bytesReadValue(ByteBuffer data)
{
uint num = (uint) data.readUnsignedShort();
uint position = (uint) data.position;
uint tag = (uint)data.readUnsignedByte ();
if (tag == 0x83||tag==0x68||tag==0x69)
{
//data.position = (int) position;
return ByteKit.complexAnalyse(data);
}
data.position = (int) position;
return ByteKit.simpleAnalyse(data);
//return ByteKit.complexAnalyse(data);
}
示例4: sampleBytesRead
public void sampleBytesRead(ByteBuffer data)
{
base.bytesRead(data);
if (this.isTag(base._tag))
{
//data.position = data.position - 3;
uint num = (uint) data.readUnsignedShort();
this._value = string.Empty;
uint position = (uint) data.position;
this._byteArray.clear();
data.readBytes(this._byteArray, 0, (int) num);
data.position = (int) position;
this._value = this._value + data.readUTFBytes((int) num);
}
}
示例5: simpleBytesRead
public void simpleBytesRead(ByteBuffer data)
{
base.bytesRead(data);
if (this.isTag(base._tag))
{
data.position -= 3;
int num = data.readUnsignedShort();
data.readByte();
this._value = new ByteBuffer();
this._value.writeBytes(data, 0, (uint) (num - 1));
this._value.position = 0;
data.position += num - 1;
}
ByteBuffer buffer2 = new ByteBuffer(ZIPUtil.Decompress(this._value.toArray()));
buffer2.readByte();
this._erlValue = ByteKit.complexAnalyse(buffer2);
}