public class ArchiveWriter extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ARCHIVE_VERSION
Current support version of the feature model archive.
|
static String |
CONTENTS_HEADER
The manifest header listing the features in this archive.
|
static String |
VERSION_HEADER
The manifest header marking an archive as a feature archive.
|
| Constructor and Description |
|---|
ArchiveWriter() |
| Modifier and Type | Method and Description |
|---|---|
static JarOutputStream |
write(OutputStream out,
Manifest baseManifest,
ArtifactProvider provider,
Feature... features)
Create a feature model archive.
|
public static final String VERSION_HEADER
public static final String CONTENTS_HEADER
public static final int ARCHIVE_VERSION
public static JarOutputStream write(OutputStream out, Manifest baseManifest, ArtifactProvider provider, Feature... features) throws IOException
ZipOutputStream.close()
on the return output stream. The caller can
add additional files through the return stream. However, the files
should not be compressed (which is the default for the output stream).
A feature model can be in different states: it might be a partial feature
model, a complete feature model or an assembled feature model. This method
takes the feature model as provided and only writes the listed bundles and
artifacts of this feature model into the archive. In general, the best
approach for sharing features is to archive complete features.out - The output stream to write tobaseManifest - Optional base manifest used for creating the manifest.provider - The artifact providerfeatures - The features model to archiveIOException - If anything goes wrongCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.