MCPcopy Create free account
hub / github.com/L-JINBIN/ApkDataMultiplexing / getInputStream

Method getInputStream

src/bin/zip/ZipFile.java:238–255  ·  view source on GitHub ↗
(ZipEntry ze)

Source from the content-addressed store, hash-verified

236 }
237
238 public InputStream getInputStream(ZipEntry ze) throws IOException {
239 long start = ze.getDataOffset();
240 int method = ze.getMethod();
241 InputStream is = new BridgeInputStream(archive, start, method == METHOD_STORED ? ze.getSize() : ze.getCompressedSize());
242 switch (method) {
243 case METHOD_DEFLATED:
244 is = new NoWrapInflaterInputStream(ze, is);
245 break;
246 case METHOD_STORED:
247 break;
248 default:
249 throw new IOException("Unsupported compression method " + ze.getMethod() + " (" + ze.getName() + ")");
250 }
251 if (method != METHOD_STORED) {
252 is = new BufferedInputStream(is, 64 * 1024);
253 }
254 return is;
255 }
256
257 public ZipFile openEntryAsZipFile(ZipEntry entry) throws IOException {
258 if (entry.getMethod() != METHOD_STORED) {

Callers 2

collectChildrenMethod · 0.80

Calls 5

getDataOffsetMethod · 0.80
getSizeMethod · 0.80
getCompressedSizeMethod · 0.80
getNameMethod · 0.65
getMethodMethod · 0.45

Tested by

no test coverage detected