Java URL Create createURL(String str)

Here you can find the source of createURL(String str)

Description

create URL

License

Open Source License

Declaration

public static String createURL(String str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.net.MalformedURLException;

import java.net.URL;

public class Main {
    public static String createURL(String str) {
        try {//from ww  w. j av a 2 s. c o m
            new URL(str);
            return null;
        } catch (MalformedURLException var2) {
            return "http://" + str;
        }
    }
}

Related

  1. createURL(final String url)
  2. createURL(String fileName)
  3. createUrl(String spec)
  4. createURL(String spec, URLStreamHandlerFactory urlHandlerFactory)
  5. createURL(String src, File basedir)
  6. createURL(String url)
  7. createURL(String url)
  8. createURL(String url)
  9. createURL(String url, String baseURI)