public static InputSource getInputSource(String fname, Jar jar, JspCompilationContext ctxt) throws IOException { InputSource source; if (jar != null) { String jarEntryName = fname.substring(1, fname.length()); source = new InputSource(jar.getInputStream(jarEntryName)); source.setSystemId(jar.getURL(jarEntryName)); } else { source = new InputSource(ctxt.getResourceAsStream(fname)); source.setSystemId(ctxt.getResource(fname).toExternalForm()); } return source; }
public static BufferedInputStream getInputStream(String fname, Jar jar, JspCompilationContext ctxt) throws IOException { InputStream in = null; if (jar != null) { String jarEntryName = fname.substring(1, fname.length()); in = jar.getInputStream(jarEntryName); } else { in = ctxt.getResourceAsStream(fname); } if (in == null) { throw new FileNotFoundException(MESSAGES.fileNotFound(fname)); } return new BufferedInputStream(in, JspUtil.JSP_INPUT_STREAM_BUFFER_SIZE); }
public static InputSource getInputSource(String fname, Jar jar, JspCompilationContext ctxt) throws IOException { InputSource source; if (jar != null) { String jarEntryName = fname.substring(1, fname.length()); source = new InputSource(jar.getInputStream(jarEntryName)); source.setSystemId(jar.getURL(jarEntryName)); } else { source = new InputSource(ctxt.getResourceAsStream(fname)); source.setSystemId(ctxt.getResource(fname).toExternalForm()); } return source; }
public static InputStream getInputStream(String fname, Jar jar, JspCompilationContext ctxt) throws IOException { InputStream in = null; if (jar != null) { String jarEntryName = fname.substring(1, fname.length()); in = jar.getInputStream(jarEntryName); } else { in = ctxt.getResourceAsStream(fname); } if (in == null) { throw new FileNotFoundException(Localizer.getMessage( "jsp.error.file.not.found", fname)); } return in; }
if ("jar".equals(url.getProtocol())) { jar = JarFactory.newInstance(url); is = jar.getInputStream(SCI_LOCATION); } else if ("file".equals(url.getProtocol())) { String path = url.getPath();
if ("jar".equals(url.getProtocol())) { jar = JarFactory.newInstance(url); is = jar.getInputStream(SCI_LOCATION); } else if ("file".equals(url.getProtocol())) { String path = url.getPath();
is = jar.getInputStream(FRAGMENT_LOCATION);
is = jar.getInputStream(FRAGMENT_LOCATION);
is = jar.getInputStream(FRAGMENT_LOCATION);