MCPcopy Create free account
hub / github.com/apache/tomcat / readFully

Method readFully

java/org/apache/catalina/util/IOTools.java:101–108  ·  view source on GitHub ↗

Read until EOF or the buffer is filled. @param is The source to read from @param buf The buffer to write to @return The number of bytes read @throws IOException If an I/O error occurs during the read

(InputStream is, byte[] buf)

Source from the content-addressed store, hash-verified

99 * @throws IOException If an I/O error occurs during the read
100 */
101 public static int readFully(InputStream is, byte[] buf) throws IOException {
102 int bytesRead = 0;
103 int read;
104 while (bytesRead < buf.length && ((read = is.read(buf, bytesRead, buf.length - bytesRead)) >= 0)) {
105 bytesRead += read;
106 }
107 return bytesRead;
108 }
109}

Callers 5

findXsltSourceMethod · 0.95
readExternalMethod · 0.45
readExternalMethod · 0.45
readExternalMethod · 0.45
readExternalMethod · 0.45

Calls 1

readMethod · 0.65

Tested by

no test coverage detected