| | |
| | | |
| | | import dell_system.MessageViewPanel; |
| | | import dell_targets.Dell_SystemConfiguration; |
| | | import publicsWay.PacketProcessingSystem; |
| | | |
| | | public class UDPPortAReceiver { |
| | | public static final int PORT =Dell_SystemConfiguration.hexport; |
| | |
| | | } |
| | | |
| | | private static String bytesToHex(byte[] bytes, int length) { |
| | | if (bytes == null || length <= 0) return ""; |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (int i = 0; i < length; i++) { |
| | | // 确保生成大写、无分隔符的十六进制 |
| | | sb.append(String.format("%02X", bytes[i])); |
| | | for (int i = 0; i < length && i < bytes.length; i++) { |
| | | sb.append(String.format("%02X", bytes[i] & 0xFF)); |
| | | } |
| | | return sb.toString(); |
| | | } |