B4J Question Archiver [SOLVED]

moore_it

Well-Known Member
Licensed User
Longtime User
Hi all,

with archiver when i use UnZip have this error message:

java.io.IOException: java.util.zip.ZipException: invalid code lengths set

ideas to resolve ?
 

moore_it

Well-Known Member
Licensed User
Longtime User
B4X:
Sub DeZippo(path As String)
	Dim zipper As Archiver
	For Each nf As String In File.ListFiles(path)
		If nf.Contains(".zip") Or nf.Contains(".ZIP") Then
			zipper.UnZip(path,nf,path,"DEZIP")
			wait for DEZIP_UnZipDone(CompletedWithoutError As Boolean, NbOfFiles As Int)
			If CompletedWithoutError Then
				' cancello lo zip
				File.Delete(path,nf)
			End If
		End If
	Next
End Sub

when i try to unzip have this error

java.io.IOException: java.util.zip.ZipException: invalid code lengths set
at flm.b4a.archiver.ArchiverForB4A.UnZip(ArchiverForB4A.java:734)
at b4j.example.globals$ResumableSub_DeZippo.resume(globals.java:186)
at b4j.example.globals._dezippo(globals.java:108)
at b4j.example.main$ResumableSub_InFTP.resume(main.java:3738)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:47)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at jdk.internal.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:42)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:136)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:85)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:487)
at anywheresoftware.b4a.keywords.Common.access$0(Common.java:467)
at anywheresoftware.b4a.keywords.Common$CallSubDelayedHelper.run(Common.java:541)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
 
Upvote 0
Top