AssetManager manager = mContext.getAssets();
  String folderPath = "/data/data/" + "com.ac.aaa" + "/databases";
  String filePath = "/data/data/" + "com.ac.aaa" + "/databases/"
    + "LottoLocation.db";
  File folder = new File(folderPath);
  File file = new File(filePath);
  FileOutputStream fos = null;
  BufferedOutputStream bos = null;
  try {
   File path = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "test.db");
    FileInputStream fis = new FileInputStream(path);
   
   BufferedInputStream bis = new BufferedInputStream(fis);
   if (folder.exists()) {
   } else {
    folder.mkdirs();
   }
   if (file.exists()) {
    file.delete();
    file.createNewFile();
   }
   fos = new FileOutputStream(file);
   bos = new BufferedOutputStream(fos);
   int read = -1;
   byte[] buffer = new byte[1024];
   while ((read = bis.read(buffer, 0, 1024)) != -1) {
    bos.write(buffer, 0, read);
   }
   bos.flush();
   bos.close();
   fos.close();
   bis.close();
   fis.close();
  } catch (IOException e) {
   Log.e("ErrorMessage : ", e.getMessage());
  }

 

 

 

제가 지금  위의 소스대로 하였는데요.. 디비가 생성은 되는데 데이터 복사가 이루어 지지를 않네요..ㅠㅠ 왜 그런 걸까요

 

sd카드에 있는 파일이 안불러 와져서 그런 건가요?