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

Method readEntry

java/org/brotli/integration/BundleHelper.java:51–68  ·  view source on GitHub ↗
(InputStream input, String entryName)

Source from the content-addressed store, hash-verified

49 }
50
51 public static byte[] readEntry(InputStream input, String entryName) throws IOException {
52 ZipInputStream zis = new ZipInputStream(input);
53 ZipEntry entry;
54 try {
55 while ((entry = zis.getNextEntry()) != null) {
56 if (entry.getName().equals(entryName)) {
57 byte[] result = readStream(zis);
58 zis.closeEntry();
59 return result;
60 }
61 zis.closeEntry();
62 }
63 } finally {
64 zis.close();
65 }
66 /* entry not found */
67 return null;
68 }
69
70 /** ECMA CRC64 polynomial. */
71 private static final long CRC_64_POLY =

Callers 7

runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95

Calls 2

readStreamMethod · 0.95
closeMethod · 0.45

Tested by 7

runMethod · 0.76
runMethod · 0.76
runMethod · 0.76
runMethod · 0.76
runMethod · 0.76
runMethod · 0.76
runMethod · 0.76