assets 폴더 내에 하위 폴더 없이 딱 파일 한개 IPCameramob.htm를 넣어두었습니다
이걸 스마트폰의 /sdcard/ 에 넣어두려고 합니다
인터넷에서 관련 코드를 찾았는데 오류는 없는데 복사가 되지 않습니다 조언 부탁드립니다
InputStream is = null;
FileOutputStream fos = null;
try {
is = getAssets().open("IPCameramob.htm");
int size = is.available();
byte[] buffer = new byte[size];
File outfile = new File("/sdcard/IPCameramob.htm");
fos = new FileOutputStream(outfile);
for (int c = is.read(buffer); c != -1; c = is.read(buffer)){
fos.write(buffer, 0, c);
}
is.close();
fos.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}