类CheckPhotos代码
package readPhoto;
import java.awt.Container;
import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import javax.imageio.ImageIO;
import org.apache.log4j.Logger;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGDecodeParam;
import com.sun.image.codec.jpeg.JPEGImageDecoder;
public class CheckPhotos {
private static Logger logger = Logger.getLogger(CheckPhotos.class);
public static void main(String[] args) throws FileNotFoundException, IOException {
File file = new File("D:\\jkk_img");
check(file);
}
//获取图片的属性值
public static void check(File file) throws FileNotFoundException, IOException{
File[] files =file.listFiles();
for(File f:files){
try{
if(f.isDirectory()){
check(f);
}else{
String filename=f.getName();
if(filename.endsWith(".jpg")){
JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new FileInputStream(f));
BufferedImage