Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 将数据库从URL存储到SQLlite数据库_Android_Database_Sqlite_Url - Fatal编程技术网

Android 将数据库从URL存储到SQLlite数据库

Android 将数据库从URL存储到SQLlite数据库,android,database,sqlite,url,Android,Database,Sqlite,Url,我正在使用URL下载数据库: URL url=new URL("url"); URLConnection ucon = url.openConnection(); ucon.setDoInput(true); InputStream is = ucon.getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); By

我正在使用URL下载数据库:

        URL url=new URL("url");
        URLConnection ucon = url.openConnection();
        ucon.setDoInput(true);
        InputStream is = ucon.getInputStream();
        BufferedInputStream bis = new BufferedInputStream(is);
        ByteArrayBuffer baf = new ByteArrayBuffer(1024);
        int current = 0;
        while ((current = bis.read()) != -1) {
            baf.append((byte) current);
        }
在“baf”中,我有我的数据库信息,你知道我如何在应用程序中存储此数据库吗?。 如果我把这个数据库写在手机的文件夹中,信息可能会暴露出来,我希望避免将其存储在应用程序的文件夹中


非常感谢

您不能这样做。。。。若你们想…将你们的数据解析为一个对象,然后像你们在后台线程中的普通应用程序那个样把它们放到数据库中,你们就必须使用内部数据库。这可能被认为是一个太无聊的问题。你不能这样做。。。。若你们想…将你们的数据解析为一个对象,然后像你们在后台线程中的普通应用程序那个样把它们放到数据库中,你们就必须使用内部数据库。这可能被认为是一个太无聊的问题。