public class ZipDatasetSource
extends java.lang.Object
ZipDatasets
to handle the creation of
zip file entries for z/OS datasets.
Instances of this class are constructed using a dataset name or pattern,
which can include:
CatalogSearch
for more information. ZUtil.getDefaultPlatformEncoding()
)
and then writing the text to ZipOutputStream encoded using
the supplied target encoding.
The name given to each entry is the actual MVS dataset name in upper case.
If the entry is for a PDS member, then the dataset name is used as
a directory name followed by the member name as a file name.
ZipDatasets the main class used to zip z/OS datasets
,
addTo(ZipOutputStream, String)
Constructor and Description |
---|
ZipDatasetSource(java.lang.String nm)
Construct an instance given a dataset/pattern name.
|
Modifier and Type | Method and Description |
---|---|
void |
addTo(java.util.zip.ZipOutputStream zipOutStream,
java.lang.String targetEncoding)
Add one or more entries to the given ZipOutputStream for the
dataset or datasets described by this ZipDatasetSource.
|
java.lang.String |
getName()
Answer the dataset/pattern name.
|
public ZipDatasetSource(java.lang.String nm)
public java.lang.String getName()
public void addTo(java.util.zip.ZipOutputStream zipOutStream, java.lang.String targetEncoding) throws java.io.IOException
zipOutStream
- the output ZipOutputStreamtargetEncoding
- the codepage used to encode the data written to the zipOutStreamjava.io.IOException