SecureBlackbox 2020 Kotlin Edition

Questions / Feedback?

BeforeExtractFile Event

Marks the start of extraction of an archived file.

Syntax

public open class DefaultArchivereaderEventListener : ArchivereaderEventListener {
  ...
  public override fun beforeExtractFile(e: ArchivereaderBeforeExtractFileEvent) {}
  ...
}

public class ArchivereaderBeforeExtractFileEvent {
  val path: String?
  val fileSize: Long
  var dataSource: Int
  var extractionPath: String?
  var skip: Boolean
}

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 2020 Kotlin Edition - Version 20.0 [Build 8063]