MCPcopy Create free account
hub / github.com/ReversecLabs/drozer / read

Method read

src/drozer/modules/common/ByteStreamReader.java:11–25  ·  view source on GitHub ↗
(InputStream stream)

Source from the content-addressed store, hash-verified

9public class ByteStreamReader {
10
11 public static byte[] read(InputStream stream) throws IOException {
12 ByteArrayOutputStream output = new ByteArrayOutputStream();
13
14 int c = 0;
15
16 while (c > -1) {
17 byte[] buf = new byte[4096];
18 c = stream.read(buf);
19
20 if (c > 0)
21 output.write(buf, 0, c);
22 }
23
24 return output.toByteArray();
25 }
26
27 public static byte[] read(InputStream stream, int offset, int count) throws IOException {
28 ByteArrayOutputStream output = new ByteArrayOutputStream();

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected