+ public HostNodeConnector toHostNodeConnector() {
+ try {
+ NodeConnector n = this.getPort();
+ InetAddress ip = InetAddress.getByAddress(NetUtils.intToByteArray4(this.getIpv4Address()));
+ byte[] macAddr = NetUtils.longToByteArray6(this.getMacAddress());
+ HostNodeConnector nc = new HostNodeConnector(macAddr, ip, n,
+ (short) 0);
+ return nc;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+