Package org.apache.sling.feature.cpconverter.vltpkg

## Class SingleFileArchive

- java.lang.Object
- - org.apache.sling.feature.cpconverter.vltpkg.SingleFileArchive

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `org.apache.jackrabbit.vault.fs.io.Archive`

    public class SingleFileArchive
    extends Object
    implements org.apache.jackrabbit.vault.fs.io.Archive

Best-effort implementation of a FileVault archive only containing a single file. Lots of information is obviously not available here (i.e. metadata, ....) Used for passing Sling Initial Content in bundles to the EntryHandlers

### Nested Class Summary

Nested Classes
`static class` `SingleFileArchive.SingleFileEntry`

### Nested classes/interfaces inherited from interface org.apache.jackrabbit.vault.fs.io.Archive

`org.apache.jackrabbit.vault.fs.io.Archive.Entry`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `close()`
`static SingleFileArchive` `fromPathOrInputStream​(Path path, InputStream inputStream, org.apache.commons.io.function.IOSupplier<Path> tmpFileSupplier, String relativePath)`
`org.apache.jackrabbit.vault.fs.io.Archive.Entry` `getEntry​(String path)`
`org.apache.jackrabbit.vault.fs.api.VaultInputSource` `getInputSource​(org.apache.jackrabbit.vault.fs.io.Archive.Entry entry)`
`org.apache.jackrabbit.vault.fs.io.Archive.Entry` `getJcrRoot()`
`org.apache.jackrabbit.vault.fs.config.MetaInf` `getMetaInf()`
`org.apache.jackrabbit.vault.fs.io.Archive.Entry` `getRoot()`
`org.apache.jackrabbit.vault.fs.io.Archive` `getSubArchive​(String root, boolean asJcrRoot)`
`void` `open​(boolean strict)`
`InputStream` `openInputStream​(org.apache.jackrabbit.vault.fs.io.Archive.Entry entry)`

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

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

### Method Detail

#### fromPathOrInputStream

    public static SingleFileArchive fromPathOrInputStream​(Path path,
                                                          InputStream inputStream,
                                                          org.apache.commons.io.function.IOSupplier<Path> tmpFileSupplier,
                                                          String relativePath)

#### open

    public void open​(boolean strict)
              throws IOException

Specified by:
  `open` in interface `org.apache.jackrabbit.vault.fs.io.Archive`
Throws:
  `IOException`

#### openInputStream

    public InputStream openInputStream​(org.apache.jackrabbit.vault.fs.io.Archive.Entry entry)
                                throws IOException

Specified by:
  `openInputStream` in interface `org.apache.jackrabbit.vault.fs.io.Archive`
Throws:
  `IOException`

#### getInputSource

    public org.apache.jackrabbit.vault.fs.api.VaultInputSource getInputSource​(org.apache.jackrabbit.vault.fs.io.Archive.Entry entry)
                                                                       throws IOException

Specified by:
  `getInputSource` in interface `org.apache.jackrabbit.vault.fs.io.Archive`
Throws:
  `IOException`

#### getJcrRoot

    public org.apache.jackrabbit.vault.fs.io.Archive.Entry getJcrRoot()
                                                               throws IOException

Specified by:
  `getJcrRoot` in interface `org.apache.jackrabbit.vault.fs.io.Archive`
Throws:
  `IOException`

#### getRoot

    public org.apache.jackrabbit.vault.fs.io.Archive.Entry getRoot()
                                                            throws IOException

Specified by:
  `getRoot` in interface `org.apache.jackrabbit.vault.fs.io.Archive`
Throws:
  `IOException`

#### getMetaInf

    public org.apache.jackrabbit.vault.fs.config.MetaInf getMetaInf()

Specified by:
  `getMetaInf` in interface `org.apache.jackrabbit.vault.fs.io.Archive`

#### getEntry

    public org.apache.jackrabbit.vault.fs.io.Archive.Entry getEntry​(String path)
                                                             throws IOException

Specified by:
  `getEntry` in interface `org.apache.jackrabbit.vault.fs.io.Archive`
Throws:
  `IOException`

#### getSubArchive

    public org.apache.jackrabbit.vault.fs.io.Archive getSubArchive​(String root,
                                                                   boolean asJcrRoot)
                                                            throws IOException

Specified by:
  `getSubArchive` in interface `org.apache.jackrabbit.vault.fs.io.Archive`
Throws:
  `IOException`

#### close

    public void close()

Specified by:
  `close` in interface `org.apache.jackrabbit.vault.fs.io.Archive`
Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`