Top Description Constructors Methods
org.apache.tomcat.util.scan

public Class NonClosingJarInputStream

extends JarInputStream
Class Inheritance
Imports
java.io.IOException, .InputStream, java.util.jar.JarInputStream

When using a JarInputStream with an XML parser, the stream will be closed by the parser. This causes problems if multiple entries from the JAR need to be parsed. This implementation makes {close() a NO-OP and adds reallyClose() that will close the stream.

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.util.zip.ZipInputStream.close.

Implements java.io.Closeable.close.

Closes this input stream and releases any system resources associated with the stream.

public void
Inherited from java.util.jar.JarInputStream:
createZipEntrygetManifestgetNextEntrygetNextJarEntryread

Constructor Detail

NonClosingJarInputStreamback to summary
public NonClosingJarInputStream(InputStream in, boolean verify) throws IOException
NonClosingJarInputStreamback to summary
public NonClosingJarInputStream(InputStream in) throws IOException

Method Detail

closeback to summary
public void close() throws IOException

Overrides java.util.zip.ZipInputStream.close.

Implements java.io.Closeable.close.

Doc from java.util.zip.ZipInputStream.close.

Closes this input stream and releases any system resources associated with the stream.

Annotations
@Override
Exceptions
IOException:
if an I/O error has occurred
reallyCloseback to summary
public void reallyClose() throws IOException