MCPcopy Index your code
hub / github.com/dumbledore/AlbiteREADER / getEntry

Method getEntry

src/gnu/zip/ZipFile.java:371–388  ·  view source on GitHub ↗

Searches for a zip entry in this archive with the given name. @param name the name. May contain directory components separated by slashes ('/'). @return the zip entry, or null if no entry with that name exists. @exception IllegalStateException when the ZipFile has already been closed

(String name)

Source from the content-addressed store, hash-verified

369 * @exception IllegalStateException when the ZipFile has already been closed
370 */
371 public ZipEntry getEntry(String name)
372 {
373 checkClosed();
374
375 try
376 {
377 Hashtable entries = getEntries();
378 ZipEntry entry = (ZipEntry) entries.get(name);
379 // If we didn't find it, maybe it's a directory.
380 if (entry == null && !name.endsWith("/"))
381 entry = (ZipEntry) entries.get(name + '/');
382 return entry != null ? new ZipEntry(entry, name) : null;
383 }
384 catch (IOException ioe)
385 {
386 return null;
387 }
388 }
389
390 /**
391 * Creates an input stream reading the given zip entry as

Callers

nothing calls this directly

Calls 3

checkClosedMethod · 0.95
getEntriesMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected