@Test public void testToBytes() throws Exception { assertNotNull(NodeIdConv.toBytes(new ArrayList<NodeId>())); assertNotNull(NodeIdConv.toBytes(nodeIds1)); assertArrayEquals(new byte[]{127, 0, 0, 1, 0, 0, 0, 1, 127, 124, 56, 1}, NodeIdConv.toBytes(nodeIds1)); assertNotNull(NodeIdConv.toBytes(node1)); assertArrayEquals(new byte[]{127, 0, 0, 1}, NodeIdConv.toBytes(node1)); }
public static byte[] toBytes(List<NodeId> nodesIds) { byte[] array = new byte[0]; for (NodeId nodeId : nodesIds) { array = ArraysUtil.combine(array, toBytes(nodeId)); } return array; }
NodeIdConv { public static byte[] toBytes(List<NodeId> nodesIds) { byte[] array = new byte[0]; for (NodeId nodeId : nodesIds) { array = ArraysUtil.combine(array, toBytes(nodeId)); } return array; } }
NodeIdConv { public static byte[] toBytes(List<NodeId> nodesIds) { byte[] array = new byte[0]; for (NodeId nodeId : nodesIds) { array = ArraysUtil.combine(array, toBytes(nodeId)); } return array; } private  NodeIdConv(); }
NodeIdConv { public static byte[] toBytes(List<NodeId> nodesIds) { byte[] array = new byte[0]; for (NodeId nodeId : nodesIds) { array = ArraysUtil.combine(array, toBytes(nodeId)); } return array; } private  NodeIdConv(); static NodeId _decode(byte[] array); static NodeId create(int nodeId); static NodeId createNodeId(InetAddress inetAddress); static NodeId createNodeId(String prefix); static PeerSequence createPeerSequence(List<NodeId> nodeIds); static List<NodeId> decode(byte[] array); static boolean equalTo(NodeId nodeId1, NodeId nodeId2); static List<NodeId> getPeerSequence(PeerSequence peerSequence); static byte[] toBytes(List<NodeId> nodesIds); static byte[] toBytes(NodeId nodeId); static String toString(NodeId nodeId); static String toString(PeerSequence peerSequence); }
NodeIdConv { public static byte[] toBytes(List<NodeId> nodesIds) { byte[] array = new byte[0]; for (NodeId nodeId : nodesIds) { array = ArraysUtil.combine(array, toBytes(nodeId)); } return array; } private  NodeIdConv(); static NodeId _decode(byte[] array); static NodeId create(int nodeId); static NodeId createNodeId(InetAddress inetAddress); static NodeId createNodeId(String prefix); static PeerSequence createPeerSequence(List<NodeId> nodeIds); static List<NodeId> decode(byte[] array); static boolean equalTo(NodeId nodeId1, NodeId nodeId2); static List<NodeId> getPeerSequence(PeerSequence peerSequence); static byte[] toBytes(List<NodeId> nodesIds); static byte[] toBytes(NodeId nodeId); static String toString(NodeId nodeId); static String toString(PeerSequence peerSequence);  }