?? ???? ??? ??????

Contents
[ Hide Show ]

?? ?? ??? Zip Archive Creation? ????? ??? ??? ? ????. ?? ?? ???? ??? ?? ??? ???? ????.

??

???? ?? ??? ? ???? ? Eventsbag ???? ????. ?? ??? ???? ????? -Entictompressed ( getentRycompressed/ setentRycompressed). ???? ??? ?? ? ?? ???? ?? ?????.

? ???? ?? ??

Zip Archive? ? 1 ? ?? ????? ???? ?? ? ???. ?? ??? ?? ? ? ?? ???? ?? ??? ???? 1 ? ??? ??? ????? ??????. ?? ????? ?? ???? ??? ??? ???? ??? ?? ???? ????.

 1try (Archive Archive = new Archive ()) {
 2    Archive.createentries ( "d : \\ bigfolder");
 3    ??? ? eb = ??? ??? ? ();
 4
 5    Instant starts = Instant.now();
 6
 7    eb.setEntryCompressed((sender, args) -> {
 8        if (starts.plusSeconds(60).isBefore(Instant.now()))
 9            args.setCancel(true);
10    });
11    ArchiveSaveOptions options = new ArchiveSaveOptions();
12    options.setEventsBag(eb);
13    archive.save("output.zip", options);
14}

?? ?? ? ??

? ?? ? ?? ??? ?? ? ? ????? :

 1try (Archive Archive = new Archive ()) {
 2    Archive.createentries ( "d : \\ bigfolder");
 3    ??? ? eb = ??? ??? ? ();
 4    eb.setentRycompressed ((Sender, Args) -> {
 5        System.out.println (args.getentry (). getName ());
 6        if (args.getEntry (). getName (). Equals ( "bigfolder \\ last.bin"))
 7            args.setcancel (true);
 8    });
 9    ArchivesAveOptions ?? = ? ???? aveOptions ();
10    ?? .seteventsbag (EB);
11    archive.save ( "output.zip", ??);
12}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.