도서관에서 빌려 두고 미쳐 못 본 sqlite 에 그림과 함께 차근차근 설명이 되어 있네.


asets 이 어쩌구 했던 모 아뒤의 댓글이 이제 좀 눈에 들어 온다.




 private static String DB_PATH = "/sdcard";
 private static String DB_NAME = "groupDB";


 //SD카드에 복사
 private void copyDataBase() throws IOException {
  InputStream myInput = this.getAssets().open(DB_NAME);
  String outFileName = DB_PATH + DB_NAME;
  OutputStream myOutput = new FileOutputStream(outFileName);
  byte[] buffer = new byte[1024];
  int total_length = 0;
  int length;
  while((length = myInput.read(buffer))>0){
   myOutput.write(buffer,0,length);
   total_length += length;
  }
  total_length += length;
  myOutput.flush();
  myOutput.close();
  myInput.close();
 }



근데, 씨발


복사는 어찌어찌 된 것으로 나오는데, 디비검색만 하면 앱이 여전히 뻗는다.


해 본 새끼는 알텐데. 말이 없네....


씨!발