protected FeatureResource loadResource( String path, Map<String, String> attribs) throws IOException { return new DualModeStaticResource(path, getResourceContent(getOptPath(path)), getResourceContent(path)); }
protected FeatureResource loadResource( String path, Map<String, String> attribs) throws IOException { return new DualModeStaticResource(path, getResourceContent(getOptPath(path)), getResourceContent(path)); }
@SuppressWarnings("unused") protected FeatureResource loadResource( String path, Map<String, String> attribs) throws IOException { String optContent = null, debugContent = null; try { optContent = getResourceContent(getOptPath(path)); } catch (IOException e) { // OK - optContent can be null. Error thrown downstream if both are null. } try { debugContent = getResourceContent(path); } catch (IOException e) { // See above; OK for debugContent to be null. } return new DualModeStaticResource(path, optContent, debugContent, attribs); }
private void loadResources(List<String> resources, Map<String,FeatureNode> featureMapBuilder) throws GadgetException { try { for (String resource : resources) { if (LOG.isLoggable(Level.FINE)) { LOG.fine("Processing resource: " + resource); } String content = resourceLoader.getResourceContent(resource); Uri parent = new UriBuilder().setScheme(RESOURCE_SCHEME).setPath(resource).toUri(); loadFeature(parent, content, featureMapBuilder); } } catch (IOException e) { throw new GadgetException(GadgetException.Code.INVALID_PATH, e); } }
for (String resource : CRLF_SPLITTER.split(resourceLoader.getResourceContent(location))) { if (resource.charAt(0) != '#') {