/**
* Copyright 2012 InCNTRE, This file is released under Apache 2.0 license except for component libraries under different licenses
http://www.apache.org/licenses/LICENSE-2.0
*/
//package com.nowjava;
/**
来 自
N o w J a v a . c o m
**/
public class Main {
public static void main(String[] argv) throws Exception {
int ip = 2;
int subnet = 2;
System.out.println(incrementSubnet(ip, subnet));
}
/**
* Increment subnet based on how subnets are to be divided
* e.g. 192.168.0.0/24 will incremented will be
* 192.168.1.0/24
* @param ip
* @param subnet
* @return the incremented subnet in integer form
*/
public static int incrementSubnet(int ip, int subnet) {
int newIP = 0;
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。