< prev index next >

jdk/src/jdk.jline/share/classes/jdk/internal/jline/internal/Urls.java

Print this page


   1 /*
   2  * Copyright (c) 2002-2012, the original author or authors.
   3  *
   4  * This software is distributable under the BSD license. See the terms of the
   5  * BSD license in the documentation provided with this software.
   6  *
   7  * http://www.opensource.org/licenses/bsd-license.php
   8  */
   9 package jline.internal;
  10 
  11 import java.io.File;
  12 import java.net.MalformedURLException;
  13 import java.net.URL;
  14 
  15 /**
  16  * URL helpers.
  17  *
  18  * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
  19  * @author <a href="mailto:gnodet@gmail.com">Guillaume Nodet</a>
  20  * @since 2.7
  21  */
  22 public class Urls
  23 {
  24     public static URL create(final String input) {
  25         if (input == null) {
  26             return null;
  27         }
  28         try {
  29             return new URL(input);
   1 /*
   2  * Copyright (c) 2002-2012, the original author or authors.
   3  *
   4  * This software is distributable under the BSD license. See the terms of the
   5  * BSD license in the documentation provided with this software.
   6  *
   7  * http://www.opensource.org/licenses/bsd-license.php
   8  */
   9 package jdk.internal.jline.internal;
  10 
  11 import java.io.File;
  12 import java.net.MalformedURLException;
  13 import java.net.URL;
  14 
  15 /**
  16  * URL helpers.
  17  *
  18  * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
  19  * @author <a href="mailto:gnodet@gmail.com">Guillaume Nodet</a>
  20  * @since 2.7
  21  */
  22 public class Urls
  23 {
  24     public static URL create(final String input) {
  25         if (input == null) {
  26             return null;
  27         }
  28         try {
  29             return new URL(input);
< prev index next >