WimArchive

Inheritance: java.lang.Object, com.aspose.zip.ILicenseStateProvider

All Implemented Interfaces: com.aspose.zip.IArchive, java.lang.AutoCloseable

public class WimArchive extends ILicenseStateProvider implements IArchive, AutoCloseable

This class represents wim archive file.

Constructors

ConstructorDescription
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

MethodDescription
close(){@inheritDoc}
dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
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.
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:

ParameterTypeDescription
sourceStreamjava.io.InputStreamthe 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:

ParameterTypeDescription
pathjava.lang.Stringthe path to the archive file

close()

public void close()

dispose()

public final void dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

extractToDirectory(String destinationDirectory)

public final void extractToDirectory(String destinationDirectory)

Extracts the archive to the file by path.

Parameters:

ParameterTypeDescription
destinationDirectoryjava.lang.Stringthe 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

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