/** * Returns an input stream for reading the specified resource from GAR file only. * * @param name Resource name. * @return An input stream for reading the resource, or {@code null} if the resource could not be * found. */ @Nullable public InputStream getResourceAsStreamGarOnly(String name) { URL url = findResource(name); try { return url != null ? url.openStream() : null; } catch (IOException ignored) { return null; } }