//
//Class CopyFile
//CopyRight:Writed By Yun
//Last modify time:
//Method: public boolean copy(String from_filename
class CopyFile
{
public boolean copy(String file
{
try //must try and catch
{
//instance the File as file_in and file_out
java
java
FileInputStream in
FileOutputStream out
byte[] bytes=new byte[
int c;
while((c=in
out
in
out
return(true); //if success then return true
}
catch(Exception e)
{
System
return(false); //if fail then return false
}
}
}
//Class CopyFile Example
/*
CopyFile copy
boolean copy_ok=py(
if(copy_ok)
{
out
}
else
{
out
}
*/
//
From:http://tw.wingwit.com/Article/program/Java/hx/201311/26140.html