MCPcopy Index your code
hub / github.com/cSploit/android / IP4Address

Method IP4Address

cSploit/src/org/csploit/android/net/IP4Address.java:54–72  ·  view source on GitHub ↗
(int address)

Source from the content-addressed store, hash-verified

52
53
54 public IP4Address(int address) throws UnknownHostException{
55 mByteArray = new byte[4];
56 mInteger = address;
57
58 if(ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN){
59 mByteArray[0] = (byte) (address & 0xFF);
60 mByteArray[1] = (byte) (0xFF & address >> 8);
61 mByteArray[2] = (byte) (0xFF & address >> 16);
62 mByteArray[3] = (byte) (0xFF & address >> 24);
63 } else{
64 mByteArray[0] = (byte) (0xFF & address >> 24);
65 mByteArray[1] = (byte) (0xFF & address >> 16);
66 mByteArray[2] = (byte) (0xFF & address >> 8);
67 mByteArray[3] = (byte) (address & 0xFF);
68 }
69
70 mAddress = InetAddress.getByAddress(mByteArray);
71 mString = mAddress.getHostAddress();
72 }
73
74 public IP4Address(String address) throws UnknownHostException{
75 mString = address;

Callers

nothing calls this directly

Calls 1

getAddressMethod · 0.45

Tested by

no test coverage detected