当前位置: 首页>>代码示例>>Java>>正文


Java ByteIntConvert.toInt方法代码示例

本文整理汇总了Java中net.fs.utils.ByteIntConvert.toInt方法的典型用法代码示例。如果您正苦于以下问题:Java ByteIntConvert.toInt方法的具体用法?Java ByteIntConvert.toInt怎么用?Java ByteIntConvert.toInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.fs.utils.ByteIntConvert的用法示例。


在下文中一共展示了ByteIntConvert.toInt方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AckListMessage

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public AckListMessage(DatagramPacket dp){
	this.dp=dp;
	dpData=dp.getData();
	ver=ByteShortConvert.toShort(dpData, 0);
	sType=ByteShortConvert.toShort(dpData, 2);
	connectId=ByteIntConvert.toInt(dpData, 4);
	clientId=ByteIntConvert.toInt(dpData, 8);
	
	
	lastRead=ByteIntConvert.toInt(dpData, 4+8);
	int sum=ByteShortConvert.toShort(dpData, 8+8);
	ackList=new ArrayList<Integer>();
	int t=0;
	for(int i=0;i<sum;i++){
		t=10+4*i;
		int sequence=ByteIntConvert.toInt(dpData, t+8);
		ackList.add(sequence);
	}
	////#MLog.println("LLLLLLLLLLLLLL "+dp.getLength()+" "+ackList.size());
	t=10+4*sum-4;
	r1=ByteIntConvert.toInt(dpData, t+4+8);
	s1=ByteIntConvert.toInt(dpData, t+8+8);

	r2=ByteIntConvert.toInt(dpData, t+12+8);
	s2=ByteIntConvert.toInt(dpData, t+16+8);

	r3=ByteIntConvert.toInt(dpData, t+20+8);
	s3=ByteIntConvert.toInt(dpData, t+24+8);

	////#MLog.println("aaaaaaaaa"+r3+"kkkkkkk "+s3);
}
 
开发者ID:breakEval13,项目名称:NSS,代码行数:32,代码来源:AckListMessage.java

示例2: CloseMessage_Stream

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public CloseMessage_Stream(DatagramPacket dp){
	this.dp=dp;
	dpData=dp.getData();
	ver=ByteShortConvert.toShort(dpData, 0);
	sType=ByteShortConvert.toShort(dpData, 2);
	
	connectId=ByteIntConvert.toInt(dpData, 4);
	clientId=ByteIntConvert.toInt(dpData, 8);
	closeOffset=ByteIntConvert.toInt(dpData, 12);
	////#MLog.println("vCloseMessagebbb"+clientId+"v");
}
 
开发者ID:breakEval13,项目名称:NSS,代码行数:12,代码来源:CloseMessage_Stream.java

示例3: PingMessage

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public PingMessage(DatagramPacket dp){
	this.dp=dp;
	dpData=dp.getData();
	ver=ByteShortConvert.toShort(dpData, 0);
	sType=ByteShortConvert.toShort(dpData, 2);
	connectId=ByteIntConvert.toInt(dpData, 4);
	clientId=ByteIntConvert.toInt(dpData, 8);
	pingId=ByteIntConvert.toInt(dpData, 12);
	downloadSpeed=ByteShortConvert.toShort(dpData, 16);
	uploadSpeed=ByteShortConvert.toShort(dpData, 18);
}
 
开发者ID:breakEval13,项目名称:NSS,代码行数:12,代码来源:PingMessage.java

示例4: CloseMessage_Conn

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public CloseMessage_Conn(DatagramPacket dp){
	this.dp=dp;
	dpData=dp.getData();
	ver=ByteShortConvert.toShort(dpData, 0);
	sType=ByteShortConvert.toShort(dpData, 2);
	connectId=ByteIntConvert.toInt(dpData, 4);
	clientId=ByteIntConvert.toInt(dpData, 8);
}
 
开发者ID:breakEval13,项目名称:NSS,代码行数:9,代码来源:CloseMessage_Conn.java

示例5: DataMessage

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public DataMessage(DatagramPacket dp){
	this.dp=dp;
	dpData=dp.getData();
	ver=ByteShortConvert.toShort(dpData, 0);
	sType=ByteShortConvert.toShort(dpData, 2);
	
	connectId=ByteIntConvert.toInt(dpData, 4);
	clientId=ByteIntConvert.toInt(dpData, 8);
	
	sequence=ByteIntConvert.toInt(dpData, 12);
	length=ByteShortConvert.toShort(dpData, 16);
	timeId=ByteIntConvert.toInt(dpData, 18);
	data=new byte[length];
	System.arraycopy(dpData, 22, data, 0, length);
}
 
开发者ID:breakEval13,项目名称:NSS,代码行数:16,代码来源:DataMessage.java

示例6: PingMessage2

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public PingMessage2(DatagramPacket dp){
	this.dp=dp;
	dpData=dp.getData();
	ver=ByteShortConvert.toShort(dpData, 0);
	sType=ByteShortConvert.toShort(dpData, 2);
	connectId=ByteIntConvert.toInt(dpData, 4);
	clientId=ByteIntConvert.toInt(dpData, 8);
	pingId=ByteIntConvert.toInt(dpData, 12);
}
 
开发者ID:breakEval13,项目名称:NSS,代码行数:10,代码来源:PingMessage2.java

示例7: PingMessage

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public PingMessage(DatagramPacket dp) {
    this.dp = dp;
    dpData = dp.getData();
    ver = ByteShortConvert.toShort(dpData, 0);
    sType = ByteShortConvert.toShort(dpData, 2);
    connectId = ByteIntConvert.toInt(dpData, 4);
    clientId = ByteIntConvert.toInt(dpData, 8);
    pingId = ByteIntConvert.toInt(dpData, 12);
    downloadSpeed = ByteShortConvert.toShort(dpData, 16);
    uploadSpeed = ByteShortConvert.toShort(dpData, 18);
}
 
开发者ID:Bpazy,项目名称:finalspeed,代码行数:12,代码来源:PingMessage.java

示例8: CloseMessage_Conn

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public CloseMessage_Conn(DatagramPacket dp) {
    this.dp = dp;
    dpData = dp.getData();
    ver = ByteShortConvert.toShort(dpData, 0);
    sType = ByteShortConvert.toShort(dpData, 2);
    connectId = ByteIntConvert.toInt(dpData, 4);
    clientId = ByteIntConvert.toInt(dpData, 8);
}
 
开发者ID:Bpazy,项目名称:finalspeed,代码行数:9,代码来源:CloseMessage_Conn.java

示例9: DataMessage

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public DataMessage(DatagramPacket dp) {
    this.dp = dp;
    dpData = dp.getData();
    ver = ByteShortConvert.toShort(dpData, 0);
    sType = ByteShortConvert.toShort(dpData, 2);

    connectId = ByteIntConvert.toInt(dpData, 4);
    clientId = ByteIntConvert.toInt(dpData, 8);

    sequence = ByteIntConvert.toInt(dpData, 12);
    length = ByteShortConvert.toShort(dpData, 16);
    timeId = ByteIntConvert.toInt(dpData, 18);
    data = new byte[length];
    System.arraycopy(dpData, 22, data, 0, length);
}
 
开发者ID:Bpazy,项目名称:finalspeed,代码行数:16,代码来源:DataMessage.java

示例10: PingMessage2

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public PingMessage2(DatagramPacket dp) {
    this.dp = dp;
    dpData = dp.getData();
    ver = ByteShortConvert.toShort(dpData, 0);
    sType = ByteShortConvert.toShort(dpData, 2);
    connectId = ByteIntConvert.toInt(dpData, 4);
    clientId = ByteIntConvert.toInt(dpData, 8);
    pingId = ByteIntConvert.toInt(dpData, 12);
}
 
开发者ID:Bpazy,项目名称:finalspeed,代码行数:10,代码来源:PingMessage2.java

示例11: AckListMessage

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public AckListMessage(DatagramPacket dp) {
    this.dp = dp;
    dpData = dp.getData();
    ver = ByteShortConvert.toShort(dpData, 0);
    sType = ByteShortConvert.toShort(dpData, 2);
    connectId = ByteIntConvert.toInt(dpData, 4);
    clientId = ByteIntConvert.toInt(dpData, 8);


    lastRead = ByteIntConvert.toInt(dpData, 4 + 8);
    int sum = ByteShortConvert.toShort(dpData, 8 + 8);
    ackList = new ArrayList<>();
    int t;
    for (int i = 0; i < sum; i++) {
        t = 10 + 4 * i;
        int sequence = ByteIntConvert.toInt(dpData, t + 8);
        ackList.add(sequence);
    }
    ////#MLog.println("LLLLLLLLLLLLLL "+dp.getLength()+" "+ackList.size());
    t = 10 + 4 * sum - 4;
    r1 = ByteIntConvert.toInt(dpData, t + 4 + 8);
    s1 = ByteIntConvert.toInt(dpData, t + 8 + 8);

    r2 = ByteIntConvert.toInt(dpData, t + 12 + 8);
    s2 = ByteIntConvert.toInt(dpData, t + 16 + 8);

    r3 = ByteIntConvert.toInt(dpData, t + 20 + 8);
    s3 = ByteIntConvert.toInt(dpData, t + 24 + 8);

    ////#MLog.println("aaaaaaaaa"+r3+"kkkkkkk "+s3);
}
 
开发者ID:Bpazy,项目名称:finalspeed,代码行数:32,代码来源:AckListMessage.java

示例12: CloseMessage_Stream

import net.fs.utils.ByteIntConvert; //导入方法依赖的package包/类
public CloseMessage_Stream(DatagramPacket dp) {
    this.dp = dp;
    dpData = dp.getData();
    ver = ByteShortConvert.toShort(dpData, 0);
    sType = ByteShortConvert.toShort(dpData, 2);

    connectId = ByteIntConvert.toInt(dpData, 4);
    clientId = ByteIntConvert.toInt(dpData, 8);
    closeOffset = ByteIntConvert.toInt(dpData, 12);
    ////#MLog.println("vCloseMessagebbb"+clientId+"v");
}
 
开发者ID:Bpazy,项目名称:finalspeed,代码行数:12,代码来源:CloseMessage_Stream.java


注:本文中的net.fs.utils.ByteIntConvert.toInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。