MCPcopy Create free account
hub / github.com/apache/tvm / recvAll

Method recvAll

jvm/core/src/main/java/org/apache/tvm/rpc/Utils.java:31–39  ·  view source on GitHub ↗
(final InputStream in, final int numBytes)

Source from the content-addressed store, hash-verified

29 */
30class Utils {
31 public static byte[] recvAll(final InputStream in, final int numBytes) throws IOException {
32 byte[] res = new byte[numBytes];
33 int numRead = 0;
34 while (numRead < numBytes) {
35 int chunk = in.read(res, numRead, Math.min(numBytes - numRead, 1024));
36 numRead += chunk;
37 }
38 return res;
39 }
40
41 public static void closeQuietly(Socket socket) {
42 if (socket != null) {

Callers 6

recvStringMethod · 0.95
invokeMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
connectToTrackerMethod · 0.95

Calls 2

minMethod · 0.80
readMethod · 0.65

Tested by

no test coverage detected