Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File directory = getDir("template", Context.MODE_PRIVATE);
- private boolean copyFile(File src,File dst)throws IOException{
- if(src.getAbsolutePath().toString().equals(dst.getAbsolutePath().toString())){
- return true;
- }else{
- InputStream is=new FileInputStream(src);
- OutputStream os=new FileOutputStream(dst);
- byte[] buff=new byte[1024];
- int len;
- while((len=is.read(buff))>0){
- os.write(buff,0,len);
- }
- is.close();
- os.close();
- }
- return true;
- }
Add Comment
Please, Sign In to add comment