本文整理汇总了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);
}
示例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");
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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");
}