Android Question Problem with file.copy2

LordZenzo

Well-Known Member
Licensed User
Longtime User
I have a problem with file.copy2
I use the command to copy a sqlite db from the library jar file
But apparently the copy appears corrupt
I did dozens of tests also to copy the file from other locations, if I use the file.copy the copy is perfect if I use the file.copy2 always appears corrupt
 

DonManfred

Expert
Licensed User
Longtime User
Examplecode from another thread... Just to show the principle
B4X:
Dim out As OutputStream
out = File.OpenOutput(File.DirRootExternal,URLwaiting.GetValueAt(i),False)
File.Copy2(HttpUtils.GetInputStream(URLwaiting.GetKeyAt(i)),out)
out.close
Don´t forget to CLOSE the outtputstream
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top