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

Method getInputStream

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

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

(String fname, Jar jar, JspCompilationContext ctxt)

Source from the content-addressed store, hash-verified

706 * @throws IOException if an I/O error occurs
707 */
708 public static BufferedInputStream getInputStream(String fname, Jar jar, JspCompilationContext ctxt)
709 throws IOException {
710
711 InputStream in;
712
713 if (jar != null) {
714 String jarEntryName = fname.substring(1);
715 in = jar.getInputStream(jarEntryName);
716 } else {
717 in = ctxt.getResourceAsStream(fname);
718 }
719
720 if (in == null) {
721 throw new FileNotFoundException(Localizer.getMessage("jsp.error.file.not.found", fname));
722 }
723
724 return new BufferedInputStream(in, JSP_INPUT_STREAM_BUFFER_SIZE);
725 }
726
727 /**
728 * Gets an input source for the given file name.

Callers 2

getReaderMethod · 0.95

Calls 3

getMessageMethod · 0.95
getInputStreamMethod · 0.65
getResourceAsStreamMethod · 0.65

Tested by

no test coverage detected