private void copyBigDataToSD(String strOutFileName) throws IOException
{
InputStream myInput;
OutputStream myOutput = new FileOutputStream(strOutFileName);
myInput = this.getAssets().open("videoChar.apk");
byte[] buffer = new byte[1024];
int length = myInput.read(buffer);
while(length > 0)
{
myOutput.write(buffer, 0, length);
length = myInput.read(buffer);
}
myOutput.flush();
myInput.close();
myOutput.close();
System.out.println("拷贝成功");
}
这段代码就是把assets目录下的文件拷贝到SDK
填入的参数就是你输出的路径
类似Environment.getExternalStorageDirectory()+"/videoChar.apk"