public static String getType(File file) throws IORuntimeException {
		FileInputStream in = null;
		try {
			in = IoUtil.toStream(file);
			return getType(in);
		} finally {
			IoUtil.close(in);
		}
	}
public static String getType ( File file ) throws IORuntimeException { FileInputStream in = null ; try { in = IoUtil . toStream ( file ) ; return getType ( in ) ; } finally { IoUtil . close ( in ) ; } }
根据文件流的头部信息获得文件类型

@param file 文件 {@link File}
@return 类型，文件的扩展名，未找到为<code>null</code>
@throws IORuntimeException 读取文件引起的异常