Compare commits
2 Commits
fec30b826c
...
7fc8b6362c
Author | SHA1 | Date |
---|---|---|
Flavien | 7fc8b6362c | 1 year ago |
Flavien | 784e5d9963 | 1 year ago |
@ -0,0 +1,17 @@
|
||||
package fr.sixthemes.beans;
|
||||
|
||||
public class NetConf {
|
||||
|
||||
protected String ipAddress;
|
||||
protected String gateway;
|
||||
protected String network;
|
||||
protected String configuration;
|
||||
|
||||
public NetConf() {
|
||||
this.ipAddress = "";
|
||||
this.gateway = "";
|
||||
this.network = "vmbr0";
|
||||
this.configuration = "dhcp";
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package fr.sixthemes;
|
||||
package fr.sixthemes.servlets;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package fr.sixthemes;
|
||||
package fr.sixthemes.servlets;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -0,0 +1,18 @@
|
||||
package fr.sixthemes.utils;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public abstract class Utils {
|
||||
|
||||
public static boolean isValidIP(String ipAddress) {
|
||||
|
||||
Pattern p = Pattern.compile("");
|
||||
Matcher m = p.matcher(ipAddress);
|
||||
|
||||
if(!m.find()) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue