Package com.aspose.zip
Class ArjLoadOptions
- java.lang.Object
-
- com.aspose.zip.ArjLoadOptions
-
public class ArjLoadOptions extends Object
Options with which archive is loaded from a compressed file.
In the .NET Framework 4.0 and above, can be used to cancel extraction.
-
-
Constructor Summary
Constructors Constructor Description ArjLoadOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetCancellationFlag(CancellationFlag value)Sets a cancellation flag used to cancel the extraction operation.
-
-
-
Method Detail
-
setCancellationFlag
public void setCancellationFlag(CancellationFlag value)
Sets a cancellation flag used to cancel the extraction operation.
Cancel ARJ archive extraction after a certain time.
Cancellation mostly results in some data not being extracted.try (CancellationFlag cf = new CancellationFlag()) { cf.cancelAfter(TimeUnit.SECONDS.toMillis(60)); ArjLoadOptions options = new ArjLoadOptions(); options.setCancellationFlag(cf); try (ArjArchive a = new ArjArchive("big.arj", options)) { try { a.getEntries().get(0).extract("data.bin"); } catch (OperationCanceledException e) { System.out.println("Extraction was cancelled after 60 seconds"); } } }- Parameters:
value- a cancellation flag used to cancel the extraction operation.
-
-