public class ZipFileOutputStreamImpl extends BufferedOutputStream
OutputStream
to a provided File
: In case the
file points to a ZIP compressed file, then a therein to be contained file
with the same name excluding the ".zip" extension is created by the
OutputStream
.buf, count
out
Constructor and Description |
---|
ZipFileOutputStreamImpl(File aFile) |
ZipFileOutputStreamImpl(File parent,
String child) |
ZipFileOutputStreamImpl(String pathname) |
ZipFileOutputStreamImpl(String parent,
String child) |
ZipFileOutputStreamImpl(URI uri) |
Modifier and Type | Method and Description |
---|---|
protected static String |
toFileNameFromZip(String aZipFileName) |
protected static OutputStream |
toOutputStream(File aFile)
Returns an
OutputStream to the provided File . |
flush, write, write
close, write
public ZipFileOutputStreamImpl(File parent, String child) throws ZipException, FileNotFoundException, IOException
public ZipFileOutputStreamImpl(String parent, String child) throws ZipException, FileNotFoundException, IOException
public ZipFileOutputStreamImpl(String pathname) throws ZipException, FileNotFoundException, IOException
public ZipFileOutputStreamImpl(URI uri) throws ZipException, FileNotFoundException, IOException
public ZipFileOutputStreamImpl(File aFile) throws ZipException, FileNotFoundException, IOException
protected static OutputStream toOutputStream(File aFile) throws ZipException, IOException, FileNotFoundException
OutputStream
to the provided File
. In case the
file points to a ZIP compressed file (it has the file suffix ".zip"),
then the data written to the OutputStream
is being ZIP
compressed.aFile
- The File
for which to get the OutputStream
.OutputStream
, in case of a ZIP compressed File
was specified (with suffix ".zip"), then a compressed
OutputStream
is returned.ZipException
- in case there were problems when accessing the ZIP
compressed File
.IOException
- in case there were problems working with the
File
.FileNotFoundException
- in case there was none such File
found.Copyright © 2017. All rights reserved.