TrueUpdate Core 0.3

net.java.trueupdate.core.zip.io
Class ZipOutputStreamAdapter

java.lang.Object
  extended by net.java.trueupdate.core.zip.io.ZipOutputStreamAdapter
All Implemented Interfaces:
Closeable, ZipOutput
Direct Known Subclasses:
JarOutputStreamAdapter

public class ZipOutputStreamAdapter
extends Object
implements ZipOutput

Adapts a ZipOutputStream to a ZipOutput.

Author:
Christian Schlichtherle
See Also:
ZipFileAdapter

Field Summary
protected  ZipOutputStream zip
          The adapted ZIP output stream.
 
Constructor Summary
protected ZipOutputStreamAdapter()
          Use of this constructor requires setting the zip field.
  ZipOutputStreamAdapter(ZipOutputStream zip)
          Constructs a new ZIP output stream adapter for the given ZIP output stream.
 
Method Summary
 void close()
           
 ZipEntry entry(String name)
          Returns a new ZIP entry.
 OutputStream stream(ZipEntry entry)
          Returns an output stream for writing the ZIP entry contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

zip

protected ZipOutputStream zip
The adapted ZIP output stream.

Constructor Detail

ZipOutputStreamAdapter

protected ZipOutputStreamAdapter()
Use of this constructor requires setting the zip field.


ZipOutputStreamAdapter

public ZipOutputStreamAdapter(@WillCloseWhenClosed
                              ZipOutputStream zip)
Constructs a new ZIP output stream adapter for the given ZIP output stream.

Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

entry

public ZipEntry entry(String name)
Description copied from interface: ZipOutput
Returns a new ZIP entry.

Specified by:
entry in interface ZipOutput

stream

public OutputStream stream(ZipEntry entry)
                    throws IOException
Description copied from interface: ZipOutput
Returns an output stream for writing the ZIP entry contents.

Specified by:
stream in interface ZipOutput
Throws:
IOException

TrueUpdate Core 0.3

Copyright © 2013 Schlichtherle IT Services. All rights reserved.