File.Copy Limitation?

alfcen

Well-Known Member
Licensed User
Longtime User
Hi,
I'm trying to copy a 10.4MB database from Assets to the external card:
File.Copy(File.DirAssets,"starref.db",File.DirRootExternal,"starref.db")

and persistantly get the error set forth below.

Is the file too large for File.Copy?

java.io.IOException
at android.content.res.AssetManager.readAsset(Native Method)
at android.content.res.AssetManager.access$700(AssetManager.java:36)
at android.content.res.AssetManager$AssetInputStream.read(AssetManager.java:571)
at anywheresoftware.b4a.objects.streams.File.Copy2(File.java:331)
at anywheresoftware.b4a.objects.streams.File.Copy(File.java:320)
at requio.com_star_catalog.reference.main._activity_create(main.java:314)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
at requio.com_star_catalog.reference.main.afterFirstLayout(main.java:84)
at requio.com_star_catalog.reference.main.access$100(main.java:16)
at requio.com_star_catalog.reference.main$WaitForLayout.run(main.java:72)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4680)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
java.io.IOException
 

alfcen

Well-Known Member
Licensed User
Longtime User
Hi Helen,
Thanks a lot for your help. I will try that first tomorrow morning.
Please check your PM box.
Cheers
Robert
 
Upvote 0

alfcen

Well-Known Member
Licensed User
Longtime User
Hi again, Helen,
Couldn't wait until tomorrow. This did the trick.
Muchas gracias, amiga!
 
Upvote 0
Top