MCPcopy Index your code
hub / github.com/apache/tomcat / getInputSource

Method getInputSource

java/org/apache/jasper/compiler/JspUtil.java:736–747  ·  view source on GitHub ↗

Gets an input source for the given file name. @param fname The file name @param jar The JAR, or null @param ctxt The compilation context @return the input source @throws IOException if an I/O error occurs

(String fname, Jar jar, JspCompilationContext ctxt)

Source from the content-addressed store, hash-verified

734 * @throws IOException if an I/O error occurs
735 */
736 public static InputSource getInputSource(String fname, Jar jar, JspCompilationContext ctxt) throws IOException {
737 InputSource source;
738 if (jar != null) {
739 String jarEntryName = fname.substring(1);
740 source = new InputSource(jar.getInputStream(jarEntryName));
741 source.setSystemId(jar.getURL(jarEntryName));
742 } else {
743 source = new InputSource(ctxt.getResourceAsStream(fname));
744 source.setSystemId(ctxt.getResource(fname).toExternalForm());
745 }
746 return source;
747 }
748
749 /**
750 * Gets the fully-qualified class name of the tag handler corresponding to the given tag file path.

Callers 1

parseMethod · 0.95

Calls 5

toExternalFormMethod · 0.80
getInputStreamMethod · 0.65
getURLMethod · 0.65
getResourceAsStreamMethod · 0.65
getResourceMethod · 0.65

Tested by

no test coverage detected