-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeader.java
37 lines (32 loc) · 852 Bytes
/
Header.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* Created by sameerraghuram on 4/22/17.
*/
public class Header {
String REQUEST;
String CLIENT;
public Header(String request){
this.REQUEST = request;
try {
this.CLIENT = IpChecker.getIp();
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
public Header(String request, String client){
this.REQUEST = request;
this.CLIENT = client;
}
public static void main(String[] args) {
try {
System.out.println(IpChecker.getIp());
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}