|
@ -5,6 +5,11 @@ import java.io.InputStreamReader; |
|
|
|
|
|
|
|
|
public class ResourceApi { |
|
|
public class ResourceApi { |
|
|
|
|
|
|
|
|
|
|
|
public String getFileFromResourceAsString(String fileName) throws IOException { |
|
|
|
|
|
InputStream inputStream = getFileFromResourceAsStream(fileName); |
|
|
|
|
|
return getStringFromInputStream(inputStream); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public InputStream getFileFromResourceAsStream(String fileName) { |
|
|
public InputStream getFileFromResourceAsStream(String fileName) { |
|
|
//ClassLoader classLoader = getClass().getClassLoader(); |
|
|
//ClassLoader classLoader = getClass().getClassLoader(); |
|
|
ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); |
|
|
ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); |
|
|