XarLoadOptions
Contents
[
Hide
]Inheritance: java.lang.Object
public class XarLoadOptions
Options with which archive is loaded from compressed file.
Constructors
Constructor | Description |
---|---|
XarLoadOptions() |
Methods
Method | Description |
---|---|
getEntryExtractionProgressed() | Gets an event that is raised when some bytes have been extracted. |
setEntryExtractionProgressed(Event<ProgressEventArgs> value) | Sets an event that is raised when some bytes have been extracted. |
XarLoadOptions()
public XarLoadOptions()
getEntryExtractionProgressed()
public final Event<ProgressEventArgs> getEntryExtractionProgressed()
Gets an event that is raised when some bytes have been extracted.
XarLoadOptions loadOptions = new XarLoadOptions();
loadOptions.setEntryExtractionProgressed((sender, args) -> {
int percent = (int)((100 * args.getProceededBytes()) / ((XarFileEntry)sender).getLength());
});
XarArchive archive = new XarArchive("archive.xar", loadOptions);
Event sender is the XarFileEntry instance which extraction is progressed.
Returns: Event - an event that is raised when some bytes have been extracted
setEntryExtractionProgressed(Event<ProgressEventArgs> value)
public final void setEntryExtractionProgressed(Event<ProgressEventArgs> value)
Sets an event that is raised when some bytes have been extracted.
XarLoadOptions loadOptions = new XarLoadOptions();
loadOptions.setEntryExtractionProgressed((sender, args) -> {
int percent = (int)((100 * args.getProceededBytes()) / ((XarFileEntry)sender).getLength());
});
XarArchive archive = new XarArchive("archive.xar", loadOptions);
Event sender is the XarFileEntry instance which extraction is progressed.
Parameters:
Parameter | Type | Description |
---|---|---|
value | com.aspose.zip.Event<com.aspose.zip.ProgressEventArgs> | an event that is raised when some bytes have been extracted |