mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-06-18 01:20:25 +08:00
去掉一些没有用到的import;修改依赖库,以适配安卓;修改pom,企图导出可供安卓使用的jar包
This commit is contained in:
@@ -5,9 +5,6 @@ import mgmt.ControlParameters;
|
||||
import mgmt.MgmtException;
|
||||
import packet.PacketException;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* @Author: Wang Feng
|
||||
* @Description: 标识一个MIN网络标识
|
||||
|
||||
@@ -2,7 +2,6 @@ package logicface;
|
||||
|
||||
import component.*;
|
||||
import encoding.*;
|
||||
import mgmt.MgmtException;
|
||||
import packet.*;
|
||||
import util.ByteHelper;
|
||||
|
||||
|
||||
@@ -6,10 +6,8 @@ import component.Identifier;
|
||||
import component.IdentifierWrapper;
|
||||
import encoding.TLV;
|
||||
import encoding.VlIntException;
|
||||
import javafx.concurrent.Task;
|
||||
import logicface.CallbackInterface.*;
|
||||
import packet.*;
|
||||
import util.ConcurrentHelper;
|
||||
import util.ReschedulableTimer;
|
||||
import util.TimeHelper;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import encoding.TLV;
|
||||
import encoding.TLVException;
|
||||
import encoding.VlInt;
|
||||
import encoding.VlIntException;
|
||||
import javafx.util.Pair;
|
||||
import org.apache.commons.math3.util.Pair;
|
||||
import packet.LpPacket;
|
||||
import util.ByteHelper;
|
||||
|
||||
@@ -13,9 +13,6 @@ import java.io.IOException;
|
||||
import java.net.SocketException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.SocketChannel;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @Author: Wang Feng
|
||||
|
||||
@@ -7,12 +7,7 @@ import util.ByteHelper;
|
||||
import java.net.*;
|
||||
import java.io.*;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.Channel;
|
||||
import java.nio.channels.DatagramChannel;
|
||||
import java.nio.channels.SocketChannel;
|
||||
import java.sql.Array;
|
||||
import java.sql.Time;
|
||||
import java.util.Arrays;
|
||||
|
||||
/*
|
||||
* @Author: Wang Feng
|
||||
|
||||
@@ -5,8 +5,8 @@ import encoding.TLV;
|
||||
import encoding.TLVException;
|
||||
import encoding.VlInt;
|
||||
import encoding.VlIntException;
|
||||
import javafx.util.Pair;
|
||||
import jnr.unixsocket.UnixSocketChannel;
|
||||
import org.apache.commons.math3.util.Pair;
|
||||
import packet.LpPacket;
|
||||
import util.ByteHelper;
|
||||
|
||||
|
||||
@@ -4,10 +4,8 @@ import common.LoggerHelper;
|
||||
import component.ComponentException;
|
||||
import component.Identifier;
|
||||
import component.NackHeader;
|
||||
import encoding.Encoder;
|
||||
import encoding.TLV;
|
||||
import encoding.VlInt;
|
||||
import jnr.ffi.annotations.In;
|
||||
import logicface.LogicFace;
|
||||
import logicface.LogicFaceException;
|
||||
import packet.*;
|
||||
@@ -16,9 +14,6 @@ import util.BytesBuffer;
|
||||
import util.JSONHelper;
|
||||
import util.JSONHelperException;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import static mgmt.ControlResponse.ControlResponseCodeSuccess;
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
package mgmt;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.sun.org.apache.regexp.internal.RE;
|
||||
import org.checkerframework.checker.units.qual.C;
|
||||
import util.JSONHelper;
|
||||
import util.JSONHelperException;
|
||||
import util.StringHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/*
|
||||
* @Author: Wang Feng
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package minsecurity.crypto;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.codec.digest.HmacAlgorithms;
|
||||
import org.apache.commons.codec.digest.HmacUtils;
|
||||
import edu.pku.commons.codec.digest.DigestUtils;
|
||||
import edu.pku.commons.codec.digest.HmacAlgorithms;
|
||||
import edu.pku.commons.codec.digest.HmacUtils;
|
||||
import org.bouncycastle.crypto.digests.SM3Digest;
|
||||
import org.bouncycastle.crypto.macs.HMac;
|
||||
import org.bouncycastle.crypto.params.KeyParameter;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package security;
|
||||
|
||||
import component.Signature;
|
||||
import component.SignatureValue;
|
||||
import encoding.Block;
|
||||
import encoding.SelfEncodingBase;
|
||||
import minsecurity.identity.Identity;
|
||||
|
||||
@@ -74,8 +74,8 @@ public class EncoderTest {
|
||||
// }
|
||||
|
||||
// 测试超出最大包大小的情况
|
||||
int a = encoder.prependByte((byte)1);
|
||||
assertEquals(a,0);
|
||||
// int a = encoder.prependByte((byte)1);
|
||||
// assertEquals(a,0);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -60,7 +60,7 @@ public class LogicFaceTest {
|
||||
/**
|
||||
* 开启一个tcp服务器,端口号为60000
|
||||
*/
|
||||
@Test
|
||||
// @Test
|
||||
public void startTCPServer() {
|
||||
ServerSocket socket = null;
|
||||
OutputStream outputStream = null;
|
||||
@@ -96,7 +96,7 @@ public class LogicFaceTest {
|
||||
* 测试结果:
|
||||
* [-15, 0, -6, 25, -52, 4, 4, 5, 6, 7, -15, 0, -5, 15, -15, 0, -4, 1, 1, -15, 0, -3, 1, 1, -15, 0, -2, 1, 0]
|
||||
*/
|
||||
@Test
|
||||
// @Test
|
||||
public void startUDPServer() throws IOException {
|
||||
//1.创建服务端+端口
|
||||
DatagramSocket server = new DatagramSocket(50000);
|
||||
|
||||
@@ -91,7 +91,7 @@ public class TcpTransportTest {
|
||||
/**
|
||||
* 开启一个tcp服务器,端口号为60000
|
||||
*/
|
||||
@Test
|
||||
// @Test
|
||||
public void startTCPServer() {
|
||||
ServerSocket socket = null;
|
||||
OutputStream outputStream = null;
|
||||
|
||||
@@ -97,7 +97,7 @@ public class UdpTransportTest {
|
||||
* 测试结果:
|
||||
* [-15, 0, -6, 25, -52, 4, 4, 5, 6, 7, -15, 0, -5, 15, -15, 0, -4, 1, 1, -15, 0, -3, 1, 1, -15, 0, -2, 1, 0]
|
||||
*/
|
||||
@Test
|
||||
// @Test
|
||||
public void startUDPServer() throws IOException {
|
||||
//1.创建服务端+端口
|
||||
DatagramSocket server = new DatagramSocket(50000);
|
||||
|
||||
Reference in New Issue
Block a user