public static ByteArrayInputStream getResourceAsStream(String path, ClassLoader loader) throws IOException { return new ByteArrayInputStream(getResourceAsBytes(path, loader)); }
final ByteArrayInputStream dtd = StreamUtil.getResourceAsStream("org/granite/config/granite-config.dtd", loader); final EntityResolver resolver = new EntityResolver() { public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { is = StreamUtil.getResourceAsStream("org/granite/client/configuration/granite-config.xml", loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null); is = StreamUtil.getResourceAsStream(stdConfig, loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null);
public String showStandardConfig() throws IOException { String s = StreamUtil.getResourceAsString("org/granite/config/granite-config.xml", getClass().getClassLoader()); return MBeanUtil.format(s); }
public String showCustomConfig() throws IOException { String path = getCustomConfigPath(); InputStream is = context.getResourceAsStream(path); try { String s = StreamUtil.getStreamAsString(is); return MBeanUtil.format(s); } finally { if (is != null) is.close(); } }
final ByteArrayInputStream dtd = StreamUtil.getResourceAsStream("org/granite/config/granite-config.dtd", loader); final EntityResolver resolver = new EntityResolver() { public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { is = StreamUtil.getResourceAsStream("org/granite/client/configuration/granite-config.xml", loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null); is = StreamUtil.getResourceAsStream(stdConfig, loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null);
public static String getResourceAsString(String path, ClassLoader loader) throws IOException { return new String(getResourceAsBytes(path, loader)); }
final ByteArrayInputStream dtd = StreamUtil.getResourceAsStream("org/granite/config/granite-config.dtd", loader); final EntityResolver resolver = new EntityResolver() { public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { is = StreamUtil.getResourceAsStream("org/granite/config/granite-config.xml", loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null); is = StreamUtil.getResourceAsStream(stdConfig, loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null);
public static String getResourceAsString(String path, ClassLoader loader) throws IOException { return new String(getResourceAsBytes(path, loader)); }
final ByteArrayInputStream dtd = StreamUtil.getResourceAsStream("org/granite/config/granite-config.dtd", loader); final EntityResolver resolver = new EntityResolver() { public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { is = StreamUtil.getResourceAsStream("org/granite/config/granite-config.xml", loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null); is = StreamUtil.getResourceAsStream(stdConfig, loader); XMap doc = new XMap(is, resolver); forElement(doc, false, null);
public static ByteArrayInputStream getResourceAsStream(String path, ClassLoader loader) throws IOException { return new ByteArrayInputStream(getResourceAsBytes(path, loader)); }
public static String getResourceAsString(String path, ClassLoader loader) throws IOException { return new String(getResourceAsBytes(path, loader)); }
public static String getResourceAsString(String path, ClassLoader loader) throws IOException { return new String(getResourceAsBytes(path, loader)); }
public static ByteArrayInputStream getResourceAsStream(String path, ClassLoader loader) throws IOException { return new ByteArrayInputStream(getResourceAsBytes(path, loader)); }
public static ByteArrayInputStream getResourceAsStream(String path, ClassLoader loader) throws IOException { return new ByteArrayInputStream(getResourceAsBytes(path, loader)); }