Here you can find the source of createURL(String urlString)
Parameter | Description |
---|---|
urlString | String representing the URL. |
Parameter | Description |
---|---|
MalformedURLException | an exception |
public static final URL createURL(String urlString) throws MalformedURLException
//package com.java2s; /******************************************************************************* * Copyright (c) 2001, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from w ww. j a v a 2 s .c o m*/ * IBM Corporation - initial API and implementation *******************************************************************************/ import java.net.MalformedURLException; import java.net.URL; public class Main { /** * Create a URL from a string. * @param urlString String representing the URL. * @return URL java.lang.URL representation of the URL. * @throws MalformedURLException */ public static final URL createURL(String urlString) throws MalformedURLException { return new URL(urlString); } }