mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-10-04 19:42:01 +08:00
solve merge error(about java packet name)
This commit is contained in:
1 parent
84ae7d1443
commit
4877609b75
6 files changed
+18
-15
No files matched your search
@@ -1,6 +1,6 @@
|
||||
package encoding;
|
||||
package main.java.encoding;
|
||||
|
||||
import util.ByteHelper;
|
||||
import main.java.util.ByteHelper;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package encoding;
|
||||
package main.java.encoding;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package encoding;
|
||||
package main.java.encoding;
|
||||
|
||||
import static util.ByteHelper.*;
|
||||
|
||||
import main.java.util.ByteHelper;
|
||||
|
||||
/*
|
||||
* @Author: Wang Feng
|
||||
@@ -77,24 +78,24 @@ public class TLV {
|
||||
return null;
|
||||
}
|
||||
|
||||
int firstbyte=uint8ToInt(getFirstByte(buffer,start));
|
||||
int firstbyte=ByteHelper.uint8ToInt(ByteHelper.getFirstByte(buffer,start));
|
||||
if(firstbyte<241){
|
||||
return new VlInt(firstbyte);
|
||||
}else if(firstbyte==241){
|
||||
if(length.subtract(start)<3){
|
||||
return null;
|
||||
}
|
||||
return new VlInt(getLenBytes(buffer,start,3));
|
||||
return new VlInt(ByteHelper.getLenBytes(buffer,start,3));
|
||||
}else if(firstbyte==242){
|
||||
if(length.subtract(start)<5){
|
||||
return null;
|
||||
}
|
||||
return new VlInt(getLenBytes(buffer,start,5));
|
||||
return new VlInt(ByteHelper.getLenBytes(buffer,start,5));
|
||||
}else if(firstbyte==243){
|
||||
if(length.subtract(start)<9){
|
||||
return null;
|
||||
}
|
||||
return new VlInt(getLenBytes(buffer,start,9));
|
||||
return new VlInt(ByteHelper.getLenBytes(buffer,start,9));
|
||||
}else{ //MIN1.0中算越界
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package encoding;
|
||||
package main.java.encoding;
|
||||
|
||||
import util.ByteHelper;
|
||||
|
||||
import main.java.util.ByteHelper;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
@@ -39,7 +40,7 @@ public class VlInt {
|
||||
return SizeOfVarNumber(this.VlIntValue);
|
||||
}
|
||||
private static int SizeOfVarNumber(BigInteger bigInteger){
|
||||
if(bigInteger.compareTo(BigInteger.valueOf(Long.parseLong("241"))) < 0){
|
||||
if(bigInteger.compareTo(BigInteger.valueOf(241)) < 0){
|
||||
return 1;
|
||||
}else if(bigInteger.compareTo(BigInteger.valueOf(
|
||||
new Double(pow(2, 16)).longValue())) < 0){
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package encoding;
|
||||
package main.java.encoding;
|
||||
|
||||
import static java.lang.Math.pow;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package util;
|
||||
package main.java.util;
|
||||
|
||||
import encoding.VlInt;
|
||||
|
||||
import main.java.encoding.VlInt;
|
||||
|
||||
/*
|
||||
* @Author: Wang Feng
|
||||
|
||||
Reference in new issue
Block a user