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)
Instantiates a new zip file output stream impl.
|
ZipFileOutputStreamImpl(File parent,
String child)
Instantiates a new zip file output stream impl.
|
ZipFileOutputStreamImpl(String pathname)
Instantiates a new zip file output stream impl.
|
ZipFileOutputStreamImpl(String parent,
String child)
Instantiates a new zip file output stream impl.
|
ZipFileOutputStreamImpl(URI uri)
Instantiates a new zip file output stream impl.
|
Modifier and Type | Method and Description |
---|---|
protected static String |
toFileNameFromZip(String aZipFileName)
To file name from zip.
|
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
parent
- the parentchild
- the childZipException
- the zip exceptionFileNotFoundException
- the file not found exceptionIOException
- Signals that an I/O exception has occurred.public ZipFileOutputStreamImpl(String parent, String child) throws ZipException, FileNotFoundException, IOException
parent
- the parentchild
- the childZipException
- the zip exceptionFileNotFoundException
- the file not found exceptionIOException
- Signals that an I/O exception has occurred.public ZipFileOutputStreamImpl(String pathname) throws ZipException, FileNotFoundException, IOException
pathname
- the pathnameZipException
- the zip exceptionFileNotFoundException
- the file not found exceptionIOException
- Signals that an I/O exception has occurred.public ZipFileOutputStreamImpl(URI uri) throws ZipException, FileNotFoundException, IOException
uri
- the uriZipException
- the zip exceptionFileNotFoundException
- the file not found exceptionIOException
- Signals that an I/O exception has occurred.public ZipFileOutputStreamImpl(File aFile) throws ZipException, FileNotFoundException, IOException
aFile
- the a fileZipException
- the zip exceptionFileNotFoundException
- the file not found exceptionIOException
- Signals that an I/O exception has occurred.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.protected static String toFileNameFromZip(String aZipFileName)
aZipFileName
- the a zip file nameZipFileInputStreamImpl.toFileNameFromZip(String)
Copyright © 2017. All rights reserved.