Package com.aspose.zip
Class Lz4LoadOptions
- java.lang.Object
-
- com.aspose.zip.Lz4LoadOptions
-
public class Lz4LoadOptions extends Object
Options for loading
Lz4Archive.
-
-
Constructor Summary
Constructors Constructor Description Lz4LoadOptions()
-
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 lz4 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)); Lz4LoadOptions options = new Lz4LoadOptions(); options.setCancellationFlag(cf); try (Lz4Archive a = new Lz4Archive("big.lz4", options)) { try { a.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.
-
-