BufferedInputStream bis = new BufferedInputStream(new FileInputStream("c:\\a.jpg"));
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("d:\\b.jpg"));
byte[] bys = new byte[1024];
int len = 0;
while((len=bis.read(bys))!=-1)
{
bos.write(bys,0,len);
}