Hello,
My problem: I have a String that contains an IP address and I would convert every byte in an array of byte []. This is what I try to do for achieving this, but unfortunately this is not working
Here is my code
Any help on this is highly appreciated. Thanks in advance.Code:StringTokenizer stok = new StringTokenizer(sourceIPAddress, "."); String oc4 = "0x" + Integer.toHexString(Integer.parseInt(stok.nextToken())); String oc3 = "0x" + Integer.toHexString(Integer.parseInt(stok.nextToken())); String by2 = "0x" + Integer.toHexString(Integer.parseInt(stok.nextToken())); String by1 = "0x" + Integer.toHexString(Integer.parseInt(stok.nextToken()));
Bookmarks