import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class Test
{
public static void main (String args[]) throws IOException
{
String from = "D:/src/test.jpg";
String to = "D:/dest/test.jpg";
copy(from, to);
}
public static void copy (String from, String to) throws IOException
{
InputStream in = null;
OutputStream out = null;
System.out.println(System.currentTimeMillis())
{
try
{
in = new FileInputStream(from);
out = new FileOutputStream(to);
while(true)
{
int data = in.read();
if (data == -1)
{
break;
}
out.write(data)
}
System.out.println(System.currentTimeMillis())
}
finally
{
if (in != null)
{
in.close();
}
if (out != null)
{
out.close();
}
}
}
}
Download this snippet
Anonymous on Feb 26, 2010
<a href="http://www.oynatsak.com"> Barbie oyunları </a>
<a href="http://www.oynatsak.com"> kız oyunları </a>
<a href="http://www.mehmetkecelioglu.com"> Php dersleri </a>
<a href="http://www.mehmetkecelioglu.com/category/php-mysql-egitimleri"> php eğitimleri </a>
Anonymous on Jun 11, 2010
Dmwb4l <a href="http://pnmtkfwzykjk.com/">pnmtkfwzykjk</a>, [url=http://lftoweyqjlku.com/]lftoweyqjlku[/url], [link=http://uyychdcpogrf.com/]uyychdcpogrf[/link], http://anjrtclienul.com/