SecureBlackbox Lite 2020 Java Edition

Questions / Feedback?

BeforeExtractFile Event

Marks the start of extraction of an archived file.

Syntax

public class DefaultArchivereaderEventListener implements ArchivereaderEventListener {
  ...
  public void beforeExtractFile(ArchivereaderBeforeExtractFileEvent e) {}
  ...
}

public class ArchivereaderBeforeExtractFileEvent {
  public String path;
  public long fileSize;
  public int dataSource;
  public String extractionPath;
  public boolean skip;
}

Remarks

Subscribe to this event to be notified about the start of extraction of an archived entry. The handler of this event is a good place to tune up the destination media.

The Path parameter indicates the path to the extracted entry in the archive. The FileSize specifies the uncompressed size of the file. Set the by-reference DataSource parameter in accordance with the desired extraction media type:

fdsFile (0)The data will be saved to a file indicated by the ExtractionPath parameter. You can change the path here.
fdsStream (1)The data will be saved into a stream assigned to FileStream property.
fdsBuffer (2)The file data will be saved to a buffer and returned via the FileData property.

If saving to a stream or buffer, use AfterExtractFile to collect the extracted data from FileStream or FileData, and dispose of any objects allocated in this event handler (such as the output stream).

Use the Skip parameter to cancel extraction of this file and proceed to the next one.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox Lite 2020 Java Edition - Version 20.0 [Build 8166]