MCPcopy
hub / github.com/google/brotli / readStream

Method readStream

java/org/brotli/integration/BundleHelper.java:41–49  ·  view source on GitHub ↗
(InputStream input)

Source from the content-addressed store, hash-verified

39 }
40
41 public static byte[] readStream(InputStream input) throws IOException {
42 ByteArrayOutputStream result = new ByteArrayOutputStream();
43 byte[] buffer = new byte[65536];
44 int bytesRead;
45 while ((bytesRead = input.read(buffer)) != -1) {
46 result.write(buffer, 0, bytesRead);
47 }
48 return result.toByteArray();
49 }
50
51 public static byte[] readEntry(InputStream input, String entryName) throws IOException {
52 ZipInputStream zis = new ZipInputStream(input);

Callers 1

readEntryMethod · 0.95

Calls 2

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected