eu.optimis.ics.p2p.Testing.java Source code

Java tutorial

Introduction

Here is the source code for eu.optimis.ics.p2p.Testing.java

Source

/*
 * Copyright (c) 2010-2013 British Telecom and City University London
 *
 * This file is part of P2PVPN component of the WP 5.4
 * (Inter-Cloud Security) of the EU OPTIMIS project.
 *
 * P2PVPN can be used under the terms of the SHARED SOURCE LICENSE
 * FOR NONCOMMERCIAL USE. 
 *
 * You should have received a copy of the SHARED SOURCE LICENSE FOR
 * NONCOMMERCIAL USE in the project's root directory. If not, please contact the
 * author at ali.sajjad@bt.com
 *
 * Author: Ali Sajjad
 *
 */
package eu.optimis.ics.p2p;

import java.net.SocketException;

import org.apache.commons.validator.routines.InetAddressValidator;

public class Testing {

    /**
     * @param args
     * @throws SocketException 
     */
    public static void main(String[] args) throws SocketException {
        // TODO Auto-generated method stub

        InetAddressValidator addressValid = new InetAddressValidator();
        String ip = VPNPeer.getLocalPeerIP();
        System.out.println(ip);
        System.out.println(addressValid.isValid(ip));

    }

}