Code example for MalformedURLException

Methods: toString

0
        } 
        try { 
            // check that the embedded url is valid 
            new URL(file);
        } catch (MalformedURLException e) {
            throw new NullPointerException(e.toString());
        } 
        setURL(url, "jar", "", -1, null, null, file, null, null); //$NON-NLS-1$//$NON-NLS-2$
    } 
 
    /** 
     * Build and return the externalized string representation of url. 
     *  
     * @return String the externalized string representation of url 
     * @param url 
     *            a URL 
     */ 
    @Override 
    protected String toExternalForm(URL url) {
        StringBuilder sb = new StringBuilder();
        sb.append("jar:"); //$NON-NLS-1$