@Override protected NonClosingJarInputStream createJarInputStream() throws IOException { return new NonClosingJarInputStream(warFile.getInputStream(jarEntry)); } }
@Override public void nextEntry() { try { entry = jarInputStream.getNextJarEntry(); } catch (IOException ioe) { entry = null; } }
@Override public void close() { if (jarInputStream != null) { try { jarInputStream.reallyClose(); } catch (IOException ioe) { // Ignore } } }
@Override public Manifest getManifest() throws IOException { reset(); return jarInputStream.getManifest(); }
@Override public Manifest getManifest() throws IOException { reset(); return jarInputStream.getManifest(); }
@Override public void nextEntry() { try { entry = jarInputStream.getNextJarEntry(); } catch (IOException ioe) { entry = null; } }
@Override protected NonClosingJarInputStream createJarInputStream() throws IOException { return new NonClosingJarInputStream(warFile.getInputStream(jarEntry)); } }
private void closeInner() { if (jarInputStream != null) { try { jarInputStream.reallyClose(); } catch (IOException ioe) { // Ignore } } }
@Override public void reset() throws IOException { closeStream(); entry = null; jarInputStream = createJarInputStream(); // Only perform multi-release processing on first access if (multiRelease == null) { if (JreCompat.isJre9Available()) { Manifest manifest = jarInputStream.getManifest(); if (manifest == null) { multiRelease = Boolean.FALSE; } else { String mrValue = manifest.getMainAttributes().getValue("Multi-Release"); if (mrValue == null) { multiRelease = Boolean.FALSE; } else { multiRelease = Boolean.valueOf(mrValue); } } } else { multiRelease = Boolean.FALSE; } if (multiRelease.booleanValue()) { if (mrMap == null) { populateMrMap(); } } } }
@Override public void nextEntry() { try { entry = jarInputStream.getNextJarEntry(); } catch (IOException ioe) { entry = null; } }
private NonClosingJarInputStream createJarInputStream() throws IOException { return new NonClosingJarInputStream(warFile.getInputStream(jarEntry)); }
private void closeInner() { if (jarInputStream != null) { try { jarInputStream.reallyClose(); } catch (IOException ioe) { // Ignore } } }
@Override public void reset() throws IOException { closeStream(); entry = null; jarInputStream = createJarInputStream(); // Only perform multi-release processing on first access if (multiRelease == null) { if (JreCompat.isJre9Available()) { Manifest manifest = jarInputStream.getManifest(); if (manifest == null) { multiRelease = Boolean.FALSE; } else { String mrValue = manifest.getMainAttributes().getValue("Multi-Release"); if (mrValue == null) { multiRelease = Boolean.FALSE; } else { multiRelease = Boolean.valueOf(mrValue); } } } else { multiRelease = Boolean.FALSE; } if (multiRelease.booleanValue()) { if (mrMap == null) { populateMrMap(); } } } }
@Override public boolean entryExists(String name) throws IOException { JarEntry entry = jarInputStream.getNextJarEntry(); while (entry != null) { if (name.equals(entry.getName())) { break; } entry = jarInputStream.getNextJarEntry(); } return entry != null; }
private NonClosingJarInputStream createJarInputStream() throws IOException { return new NonClosingJarInputStream(warFile.getInputStream(jarEntry)); }
protected void closeStream() { if (jarInputStream != null) { try { jarInputStream.reallyClose(); } catch (IOException ioe) { // Ignore } } }
@Override public boolean entryExists(String name) throws IOException { JarEntry entry = jarInputStream.getNextJarEntry(); while (entry != null) { if (name.equals(entry.getName())) { break; } entry = jarInputStream.getNextJarEntry(); } return entry != null; }
private NonClosingJarInputStream createJarInputStream() throws IOException { JarURLConnection jarConn = (JarURLConnection) url.openConnection(); URL resourceURL = jarConn.getJarFileURL(); URLConnection resourceConn = resourceURL.openConnection(); resourceConn.setUseCaches(false); return new NonClosingJarInputStream(resourceConn.getInputStream()); }
protected void closeStream() { if (jarInputStream != null) { try { jarInputStream.reallyClose(); } catch (IOException ioe) { // Ignore } } }
@Override public boolean entryExists(String name) throws IOException { JarEntry entry = jarInputStream.getNextJarEntry(); while (entry != null) { if (name.equals(entry.getName())) { break; } entry = jarInputStream.getNextJarEntry(); } return entry != null; }