Class ArchiveReader

java.lang.Object
org.apache.sling.feature.io.archive.ArchiveReader

public class ArchiveReader extends Object
The feature archive reader can be used to read an archive based on a feature model. The archive contains the model and all artifacts.
  • Constructor Details

    • ArchiveReader

      public ArchiveReader()
  • Method Details

    • read

      public static Set<Feature> read(InputStream in, ArchiveReader.ArtifactConsumer consumer) throws IOException
      Read a feature model archive. The input stream is not closed. It is up to the caller to close the input stream.
      Parameters:
      in - The input stream to read from.
      consumer - The plugin consuming the binaries, including the features. If no consumer is provided, only the features will be returned.
      Returns:
      The feature models mentioned in the manifest of the archive
      Throws:
      IOException - If anything goes wrong