org.apache.sling.provisioning.model.io

## Class ModelArchiveReader

- java.lang.Object
- - org.apache.sling.provisioning.model.io.ModelArchiveReader

    public class ModelArchiveReader
    extends Object

The model archive reader can be used to read an archive based on a model The archive contains the model file and all artifacts.

Since:
  1.3

### Nested Class Summary

Nested Classes
`static interface` `ModelArchiveReader.ArtifactConsumer`

### Constructor Summary

Constructors
Constructor and Description
`ModelArchiveReader()`

### Method Summary

All Methods Static Methods Concrete Methods
`static Model` `read(InputStream in, ModelArchiveReader.ArtifactConsumer consumer)` Read a model archive.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ModelArchiveReader

    public ModelArchiveReader()

### Method Detail

#### read

    public static Model read(InputStream in,
                             ModelArchiveReader.ArtifactConsumer consumer)
                      throws IOException

Read a 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.
Returns:
  The model
Throws:
  `IOException` - If anything goes wrong