package com.uas.report.crystal2jasper;

import java.io.File;
import java.io.FileNotFoundException;
import java.net.URL;

/**
 * @author sunyj
 * @since 2017/12/7 10:09
 */
public class ResourceUtils {

    public static File getFile(String name) throws FileNotFoundException {
        URL resource = ResourceUtils.class.getClassLoader().getResource(name);
        return resource == null ? null : new File(resource.getFile());
    }
}
