updated CopyJPG.java
1. add another method to copy file
2. fix flush code miss bug