(String fullPath, boolean zipOnly)
| 436 | } |
| 437 | |
| 438 | private URL _getURLFromPath(String fullPath, boolean zipOnly) { |
| 439 | URL url = null; |
| 440 | try { |
| 441 | if (!fullPath.startsWith("/TEMP/")) { |
| 442 | if (fullPath.startsWith("/")) |
| 443 | fullPath = fullPath.substring(1); |
| 444 | for (int i = sortedList.length; --i >= 0;) { |
| 445 | if (fullPath.startsWith(sortedList[i])) { |
| 446 | url = assetsByPath.get(sortedList[i]).getURL(fullPath); |
| 447 | ZipEntry ze = findZipEntry(url); |
| 448 | if (ze == null) { |
| 449 | url = null; |
| 450 | break; |
| 451 | } |
| 452 | if (isJS) { |
| 453 | jsutil.setURLBytes(url, jsutil.getZipBytes(ze)); |
| 454 | } |
| 455 | break; |
| 456 | } |
| 457 | } |
| 458 | } |
| 459 | if (url == null && !zipOnly) |
| 460 | url = getAbsoluteURL((fullPath.startsWith("TEMP/") ? "/" + fullPath : fullPath)); |
| 461 | } catch (MalformedURLException e) { |
| 462 | } |
| 463 | if (debugging) { |
| 464 | System.out.println("Assets.getURLFromPath " + url); |
| 465 | } |
| 466 | return url; |
| 467 | } |
| 468 | |
| 469 | public static ZipEntry findZipEntry(URL url) { |
| 470 | if (url == null) |
no test coverage detected