WimArchive
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.zip.IArchive, java.lang.AutoCloseable
public class WimArchive implements IArchive, AutoCloseable
This class represents wim archive file.
Constructors
Constructor | Description |
---|---|
WimArchive(InputStream sourceStream) | Initializes a new instance of the WimArchive class and composes entries list can be extracted from the archive. |
WimArchive(String path) | Initializes a new instance of the WimArchive class and composes entries list can be extracted from the archive. |
Methods
Method | Description |
---|---|
close() | {@inheritDoc} |
extractToDirectory(String destinationDirectory) | Extracts the archive to the file by path. |
getBootImageIndex() | Gets the (zero-based) index of the bootable image. |
getFileEntries() | Gets entries of IArchiveFileEntry type constituting the wim archive. |
getFileFormatVersion() | Gets the version of the file format. |
getGuid() | Gets the identifying UUID for the archive. |
getImages() | Gets entries of WimImage type constituting the archive. |
getManifest() | Gets the embedded manifest describing the file and the contained images. |
WimArchive(InputStream sourceStream)
public WimArchive(InputStream sourceStream)
Initializes a new instance of the WimArchive class and composes entries list can be extracted from the archive.
The following example shows how to extract all of the entries to a directory.
try (WimArchive archive = new WimArchive(new FileInputStream("archive.wim"))) {
archive.getImages().get_Item(0).extractToDirectory("C:\\extracted");
} catch (IOException ex) {
}
This constructor does not unpack any entry. See WimFileEntry.open() method for unpacking.
Parameters:
Parameter | Type | Description |
---|---|---|
sourceStream | java.io.InputStream | the source of the archive |
WimArchive(String path)
public WimArchive(String path)
Initializes a new instance of the WimArchive class and composes entries list can be extracted from the archive.
The following example shows how to extract all of the entries to a directory.
try (WimArchive archive = new WimArchive("archive.wim")) {
archive.getImages().get_Item(0).extractToDirectory("C:\\extracted");
}
This constructor does not unpack any entry. See WimFileEntry.open() method for unpacking.
Parameters:
Parameter | Type | Description |
---|---|---|
path | java.lang.String | the path to the archive file |
close()
public void close()
extractToDirectory(String destinationDirectory)
public final void extractToDirectory(String destinationDirectory)
Extracts the archive to the file by path.
Parameters:
Parameter | Type | Description |
---|---|---|
destinationDirectory | java.lang.String | the path to the directory to place the extracted files in |
getBootImageIndex()
public final int getBootImageIndex()
Gets the (zero-based) index of the bootable image.
Returns: int - the (zero-based) index of the bootable image
getFileEntries()
public final Iterable<IArchiveFileEntry> getFileEntries()
Gets entries of IArchiveFileEntry type constituting the wim archive.
Returns: java.lang.Iterable<com.aspose.zip.IArchiveFileEntry> - entries of IArchiveFileEntry type constituting the wim archive
getFileFormatVersion()
public final int getFileFormatVersion()
Gets the version of the file format.
Returns: int - the version of the file format
getGuid()
public final UUID getGuid()
Gets the identifying UUID for the archive.
Returns: java.util.UUID - the identifying UUID for the archive
getImages()
public final List<WimImage> getImages()
Gets entries of WimImage type constituting the archive.
Returns: java.util.List<com.aspose.zip.WimImage> - entries of WimImage type constituting the archive
getManifest()
public final String getManifest()
Gets the embedded manifest describing the file and the contained images.
Returns: java.lang.String - the embedded manifest describing the file and the contained images