public boolean unXz ( File srcFileToArchive , String destFilePath ) { boolean success = true ; try { XZUnArchiver XZUnArchiver = new XZUnArchiver ( ) ; XZUnArchiver . enableLogging ( new ConsoleLogger ( ConsoleLogger . LEVEL_DISABLED , UN_ARCHIVER_LOGGER ) ) ; XZUnArchiver . setSourceFile ( srcFileToArchive ) ; XZUnArchiver . setDestFile ( new File ( destFilePath ) ) ; XZUnArchiver . extract ( ) ; } catch ( Exception e ) { success = false ; logger . warn ( "Failed to extract Xz file : {} - {}" , srcFileToArchive . getPath ( ) , e . getMessage ( ) ) ; } return success ; }
extract xz files