equal
deleted
inserted
replaced
22 */ |
22 */ |
23 |
23 |
24 package p2; |
24 package p2; |
25 |
25 |
26 import java.io.InputStream; |
26 import java.io.InputStream; |
|
27 import java.io.IOException; |
27 import java.net.URL; |
28 import java.net.URL; |
|
29 import java.util.Enumeration; |
28 |
30 |
29 public class Main { |
31 public class Main { |
30 private Main() { } |
32 private Main() { } |
31 |
33 |
32 public static URL getResourceInClassLoader(String name) { |
34 public static URL getResourceInClassLoader(String name) { |
33 return Main.class.getClassLoader().getResource(name); |
35 return Main.class.getClassLoader().getResource(name); |
34 } |
36 } |
35 |
37 |
|
38 public static Enumeration<URL> getResourcesInClassLoader(String name) throws IOException { |
|
39 return Main.class.getClassLoader().getResources(name); |
|
40 } |
|
41 |
36 public static InputStream getResourceAsStreamInClassLoader(String name) { |
42 public static InputStream getResourceAsStreamInClassLoader(String name) { |
37 return Main.class.getClassLoader().getResourceAsStream(name); |
43 return Main.class.getClassLoader().getResourceAsStream(name); |
38 } |
44 } |
39 } |
45 } |