锘??xml version="1.0" encoding="utf-8" standalone="yes"?>成人久久久精品乱码一区二区三区,色在线视频网,在线观看亚洲精品http://www.aygfsteel.com/gen-sky/category/36135.html鎴戜滑鐜板湪涓嶆槸搴旇璁ㄨ璇ヤ笉璇ユ尳鐣欙紝榪樻槸鍥犱負(fù)璁ㄨ濡備綍鐤忓鎴戜滑鐨勪簰鑱旂綉濡備綍鍙戝睍銆備簰鑱旂綉榪欑寮哄ぇ鐨勬鍣紝榪樻病鏈夋帉鎻″湪鎴戜滑鎵嬩腑錛屾墍浠ラ渶瑕佺揣蹇帉鎻°?/description>zh-cnFri, 19 Mar 2010 10:43:38 GMTFri, 19 Mar 2010 10:43:38 GMT60Java鍒ゆ柇鍥劇墖鏂囦歡鐨勭被鍨? http://www.aygfsteel.com/gen-sky/archive/2010/03/17/315675.html鏄熸湡浜?/dc:creator>鏄熸湡浜?/author>Wed, 17 Mar 2010 07:04:00 GMThttp://www.aygfsteel.com/gen-sky/archive/2010/03/17/315675.htmlhttp://www.aygfsteel.com/gen-sky/comments/315675.htmlhttp://www.aygfsteel.com/gen-sky/archive/2010/03/17/315675.html#Feedback0http://www.aygfsteel.com/gen-sky/comments/commentRss/315675.htmlhttp://www.aygfsteel.com/gen-sky/services/trackbacks/315675.html     鍒ゆ柇鏂囦歡鐨勭被鍨嬶紝鑰屼笉鏄垽鏂枃浠剁殑鍚庣紑鍚?br />


import java.io.*;
import javax.imageio.*;
import java.util.*;
import javax.imageio.stream.*;

public class Test {
    
public static void main(String[] args) {
        File f 
= new File("c://test//3.jpg");
        
if (f.exists()) {
            System.out.println(getFormatInFile(f));
        }
    }

    
// Returns the format of the image in the file 'f'.
    
// Returns null if the format is not known.
    public static String getFormatInFile(File f) {
        
return getFormatName(f);
    }

    
// Returns the format name of the image in the object 'o'.
    
// Returns null if the format is not known.
    private static String getFormatName(Object o) {
        
try {
            
// Create an image input stream on the image
            ImageInputStream iis = ImageIO.createImageInputStream(o);

            
// Find all image readers that recognize the image format
            Iterator iter = ImageIO.getImageReaders(iis);
            
if (!iter.hasNext()) {
                
// No readers found
                return null;
            }

            
// Use the first reader
            ImageReader reader = (ImageReader) iter.next();

            
// Close stream
            iis.close();

            
// Return the format name
            return reader.getFormatName();
        } 
catch (IOException e) {
            
//
        }

        
// The image could not be read
        return null;
    }
}




]]>
主站蜘蛛池模板: 罗山县| 河源市| 宜兰县| 西盟| 临安市| 大姚县| 凌云县| 诸城市| 遵化市| 西青区| 荔波县| 莫力| 灌阳县| 叙永县| 巩留县| 英吉沙县| 方正县| 连城县| 武夷山市| 武义县| 云和县| 青龙| 双柏县| 临清市| 琼海市| 博罗县| 望城县| 青田县| 元朗区| 阳山县| 伊春市| 三都| 高州市| 调兵山市| 平塘县| 神池县| 丰城市| 康马县| 历史| 海安县| 武宁县|