ZArchiveSaveOptions

Inheritance: java.lang.Object

public class ZArchiveSaveOptions

Settings for Zarchive.

Constructors

ConstructorDescription
ZArchiveSaveOptions()

Methods

MethodDescription
getCompressionProgressed()Gets an event that is raised when a portion of raw stream compressed.
setCompressionProgressed(Event<ProgressEventArgs> value)Sets an event that is raised when a portion of raw stream compressed.

ZArchiveSaveOptions()

public ZArchiveSaveOptions()

getCompressionProgressed()

public Event<ProgressEventArgs> getCompressionProgressed()

Gets an event that is raised when a portion of raw stream compressed.


     File source = new File("huge.bin");
     ZArchiveSaveOptions settings = new ZArchiveSaveOptions();
     settings.setCompressionProgressed((sender, args) -> {
         int percent = (int)((100 * args.getProceededBytes()) / source.length());
     });
 

Returns: Event - an event that is raised when a portion of raw stream compressed

setCompressionProgressed(Event<ProgressEventArgs> value)

public void setCompressionProgressed(Event<ProgressEventArgs> value)

Sets an event that is raised when a portion of raw stream compressed.


     File source = new File("huge.bin");
     ZArchiveSaveOptions settings = new ZArchiveSaveOptions();
     settings.setCompressionProgressed((sender, args) -> {
         int percent = (int)((100 * args.getProceededBytes()) / source.length());
     });
 

Parameters:

ParameterTypeDescription
valuecom.aspose.zip.Event<com.aspose.zip.ProgressEventArgs>an event that is raised when a portion of raw stream compressed