Class ZipOnDemandInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.jboss.shrinkwrap.impl.base.exporter.AbstractOnDemandInputStream<java.util.zip.ZipOutputStream>
-
- org.jboss.shrinkwrap.impl.base.exporter.zip.ZipOnDemandInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
class ZipOnDemandInputStream extends AbstractOnDemandInputStream<java.util.zip.ZipOutputStream>
ZIP on demand input stream.
-
-
Field Summary
-
Fields inherited from class org.jboss.shrinkwrap.impl.base.exporter.AbstractOnDemandInputStream
outputStream
-
-
Constructor Summary
Constructors Constructor Description ZipOnDemandInputStream(Archive<?> archive)Creates stream directly from archive.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseEntry(java.util.zip.ZipOutputStream outputStream)Closes the current entry context for the specifiedOutputStream.protected java.util.zip.ZipOutputStreamcreateOutputStream(java.io.OutputStream outputStream)Creates the realOutputStreamto which we'll write, wrapping the provided target.protected voidputNextEntry(java.util.zip.ZipOutputStream outputStream, java.lang.String context)Writes the next entry (demarcates a new file/folder is to be written).-
Methods inherited from class org.jboss.shrinkwrap.impl.base.exporter.AbstractOnDemandInputStream
read
-
-
-
-
Constructor Detail
-
ZipOnDemandInputStream
ZipOnDemandInputStream(Archive<?> archive)
Creates stream directly from archive.- Parameters:
archive-
-
-
Method Detail
-
createOutputStream
protected java.util.zip.ZipOutputStream createOutputStream(java.io.OutputStream outputStream)
Description copied from class:AbstractOnDemandInputStreamCreates the realOutputStreamto which we'll write, wrapping the provided target.- Specified by:
createOutputStreamin classAbstractOnDemandInputStream<java.util.zip.ZipOutputStream>- Returns:
-
closeEntry
protected void closeEntry(java.util.zip.ZipOutputStream outputStream) throws java.io.IOExceptionDescription copied from class:AbstractOnDemandInputStreamCloses the current entry context for the specifiedOutputStream.- Specified by:
closeEntryin classAbstractOnDemandInputStream<java.util.zip.ZipOutputStream>- Throws:
java.io.IOException
-
putNextEntry
protected void putNextEntry(java.util.zip.ZipOutputStream outputStream, java.lang.String context) throws java.io.IOExceptionDescription copied from class:AbstractOnDemandInputStreamWrites the next entry (demarcates a new file/folder is to be written).- Specified by:
putNextEntryin classAbstractOnDemandInputStream<java.util.zip.ZipOutputStream>- Throws:
java.io.IOException- If an error occurred writing the entry
-
-