(String path)
| 580 | } |
| 581 | |
| 582 | public URL getResource(String path) { |
| 583 | if (path.startsWith("/")) { |
| 584 | path = path.substring(1); |
| 585 | } else { |
| 586 | String name = Classes.makeString |
| 587 | (vmClass.name, 0, vmClass.name.length - 1); |
| 588 | int index = name.lastIndexOf('/'); |
| 589 | if (index >= 0) { |
| 590 | path = name.substring(0, index) + "/" + path; |
| 591 | } |
| 592 | } |
| 593 | return getClassLoader().getResource(path); |
| 594 | } |
| 595 | |
| 596 | public InputStream getResourceAsStream(String path) { |
| 597 | URL url = getResource(path); |
no test coverage detected