Java Resource File getTestResourceFile(String pName, Class pClass)

Here you can find the source of getTestResourceFile(String pName, Class pClass)

Description

get Test Resource File

License

Open Source License

Declaration

public static File getTestResourceFile(String pName, Class pClass) 

Method Source Code


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

import java.io.File;

import java.net.URL;

public class Main {
    public static File getTestResourceFile(String pName, Class pClass) {
        URL lFile = pClass.getResource(pName);
        return new File(lFile.getFile());
    }/*  w  w  w . ja v  a 2s. c om*/
}

Related

  1. getParentResource(final Class c, final String resource)
  2. getSampleDir(File resourcesDir)
  3. getShortName(String resource, Map nsMap)
  4. getSourceForResource(String s)
  5. getStreamFromResource(Class clazz, String resourceName)
  6. inputStream(Class baseClass, String resourceName)
  7. isFullIRI(String resource)
  8. loadAutoConfigFiles(ClassLoader classLoader, String resourceName)
  9. loadConfigFile(String resource, Class clazz)