I think many people have already read this article:
Using your own SQLite database in Android applications: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/comment-page-2/#comment-12368
However, it continues to bring an IOException to
while ((length = myInput.read(buffer))>0){ myOutput.write(buffer, 0, length); }
I am trying to use a large DB file. Its size is> 8 MB. I built it using sqlite3 on Mac OS X, inserted UTF-8 encoded strings (since I use Korean), the android_meta table with ko_KR as the locale is added as above.
However, when I debug, it keeps showing an IOException in
length=myInput.read(buffer)
I suspect this is due to an attempt to read a large file. If not, I donβt know why. I tested the same code using a much smaller text file and it worked fine.
Can someone help me with this? I searched for many places, but not one place gave me a clear answer or a good solution. Good value is effective or simple.
I will try to use BufferedInput (Output) Stream , but if it is simpler it cannot work, I do not think this will work either.
Can anyone explain the fundamental limitations of file I / O in Android and maybe the right way? I will greatly appreciate an attentive answer. Thanks.
BIG DETAILS:
private void copyDataBase() throws IOException{