public PutNextEntry ( String entryName ) : |
||
entryName | String | /// The name of the entry to be added, including any path to be used /// within the zip file. /// |
return |
Call this method just before calling Write(byte[], int, int), to specify the name of the entry that the next set of bytes written to the ZipOutputStream
belongs to. All subsequent calls to Write
, until the next call to PutNextEntry
, will be inserted into the named entry in the zip file.
If the entryName used in PutNextEntry()
ends in a slash, then the entry added is marked as a directory. Because directory entries do not contain data, a call to Write()
, before an intervening additional call to PutNextEntry()
, will throw an exception.
If you don't call Write()
between two calls to PutNextEntry()
, the first entry is inserted into the zip file as a file of zero size. This may be what you want.
Because PutNextEntry()
closes out the prior entry, if any, this method may throw if there is a problem with the prior entry.
This method returns the ZipEntry
. You can modify public properties on the ZipEntry
, such as ZipEntry.Encryption, ZipOutputStream.Write()
, or until the next call to PutNextEntry()
. If you modify the ZipEntry
after having called Write()
, you may get a runtime exception, or you may silently get an invalid zip archive.
public PutNextEntry ( String entryName ) : |
||
entryName | String | /// The name of the entry to be added, including any path to be used /// within the zip file. /// |
return |