Skip to content

Commit

Permalink
增加ip工具类
Browse files Browse the repository at this point in the history
  • Loading branch information
akwei committed Apr 14, 2012
1 parent 5ec28df commit 3f930b9
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/halo/util/IPUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import org.apache.commons.collections.FastTreeMap;

import sun.net.util.IPAddressUtil;

Expand Down Expand Up @@ -126,11 +122,4 @@ public static int countSignal(String str, String s) {
}
return sum;
}

public static void main(String[] args) {
P.println(IPUtil.getIpNumber("e13::").toString());
Map<String, String> map;
FastTreeMap ftm;
TreeMap<String, String> tm;
}
}
41 changes: 41 additions & 0 deletions src/halo/util/IpData.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package halo.util;

public class IpData {

private long begin;

private long end;

private String name;

public IpData(long begin, long end, String name) {
super();
this.begin = begin;
this.end = end;
this.name = name;
}

public long getBegin() {
return begin;
}

public void setBegin(long begin) {
this.begin = begin;
}

public long getEnd() {
return end;
}

public void setEnd(long end) {
this.end = end;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}

0 comments on commit 3f930b9

Please sign in to comment.