FileReader reader = new FileReader(file1); FileWriter writer = new FileWriter(file2); byte [] b = new byte[100]; int i=1; while(reader.ready()){ b[i]=(byte) reader.read(); i++;} for(i=1;i<b.length;i++){ if(i%2==0) { writer.write(b[i]); } }