You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2003/10/31 11:31:54 UTC
cvs commit: cocoon-lenya/src/test/org/apache/lenya/net InetAddressUtilTest.java
michi 2003/10/31 02:31:54
Added: src/test/org/apache/lenya/net InetAddressUtilTest.java
Log:
Test added
Revision Changes Path
1.1 cocoon-lenya/src/test/org/apache/lenya/net/InetAddressUtilTest.java
Index: InetAddressUtilTest.java
===================================================================
package org.apache.lenya.net;
import java.net.InetAddress;
/**
*
*/
public class InetAddressUtilTest {
/**
*
*/
public static void main(String[] args) {
if (args.length != 3) {
System.out.println("Usage: " + new InetAddressUtilTest().getClass().getName() + " network subnet ip");
return;
}
try {
InetAddress network = InetAddress.getByName(args[0]); // "195.226.6.64");
InetAddress subnet = InetAddress.getByName(args[1]); // "255.255.255.0");
InetAddress ip = InetAddress.getByName(args[2]); // "195.226.6.70");
System.out.println(InetAddressUtil.contains(network, subnet, ip));
} catch(Exception e) {
System.err.println(e);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org