public static StringBuilder check(String path) {
		// TODO Auto-generated method stub
		StringBuilder sb = new StringBuilder();
		byte[] size = null;
		StringBuilder noAlgorithm=new StringBuilder("无法使用MD5算法，这可能是你的JAVA虚拟机版本太低");
		StringBuilder fileNotFound=new StringBuilder("未能找到文件，请重新定位文件路径");
		StringBuilder IOerror=new StringBuilder("文件输入流错误");
		try {
			MessageDigest md5=MessageDigest.getInstance("MD5");//生成MD5类的实例
			File file = new File(path); //创建文件实例，设置路径为方法参数
			FileInputStream fs = new FileInputStream(file); 
			BufferedInputStream bi = new BufferedInputStream(fs); 
			ByteArrayOutputStream bo = new ByteArrayOutputStream(); 
			byte[] b = new byte[bi.available()]; //定义字节数组b大小为文件的不受阻塞的可访问字节数
			int i; 
			//将文件以字节方式读到数组b中
			while ((i = bi.read(b, 0, b.length)) != -1) 
			{ 
			} 
			md5.update(b);//执行MD5算法
			for (byte by : md5.digest()) 
			{
			sb.append(String.format("%02X", by));//将生成的字节MD５值转换成字符串
			}
			bo.close();
			bi.close();
		} catch (NoSuchAlgorithmException e) {
			// TODO Auto-generated catch block
			return noAlgorithm;
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			return fileNotFound;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			return IOerror;
		}
      return sb;//返回MD５值
	}