用我这个可以
import *;
public class imagereadtest {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try{
File f1= new File("F:\\javacode\\1.bmp");
FileInputStream fis=new FileInputStream(f1);
DataInputStream dis=new DataInputStream(fis);
File f2 =new File("F:\\javacode\\2.bmp");
FileOutputStream fos=new FileOutputStream(f2);
DataOutputStream dos=new DataOutputStream(fos);
int
code;
while ((code=dis.readUnsignedByte())!=-1)
{ dos.write(code);}
dis.close();
dos.close();
} catch (IOException e){}
}