Java File to URL FileToURL(File file)

Here you can find the source of FileToURL(File file)

Description

File To URL

License

Open Source License

Declaration

public static URL FileToURL(File file) throws MalformedURLException 

Method Source Code


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

import java.io.File;

import java.net.MalformedURLException;

import java.net.URL;

public class Main {
    public static URL FileToURL(File file) throws MalformedURLException {
        return file.toURI().toURL();
    }//from   w  w  w .  j ava  2 s.  c o  m
}

Related

  1. fileToURL(File f)
  2. fileToURL(File file)
  3. fileToURL(File file)
  4. fileToUrl(File file)
  5. fileToURL(File file)
  6. fileToURL(File file)
  7. fileToURL(File file)
  8. fileToURL(File file)