public static boolean fileprocess(String downloadpath, String filepath, String []paras, String sn){

		int errorcode=0;// print error code in the final output file;
		int errornum=6; // feature number
		String result="";
		double emmc_size=0;
		double size = 0;

		File downloadfile = new File(downloadpath+"\\emmc_test.txt");
		File outputfile = new File(filepath);	
				

		try {
			String line="";
			ArrayList<String> content = new ArrayList<String>();
			BufferedReader br = new BufferedReader(new FileReader(downloadfile));
			while ((line=br.readLine())!=null){
				content.add(line);
			}
			br.close();
			downloadfile.delete();
			
			for (int i=1;i<content.size();i++){
				String []values = content.get(i).split("\\s+"); // the second row contains specific values; The split sign is continuous blank space
				size+=Integer.parseInt(values[1]);
			}
			
			
			emmc_size=size/(1024*1024);
			
			if ((emmc_size>Double.parseDouble(paras[0])&&(emmc_size<Double.parseDouble(paras[1])))){
				result="PASS";
			}
			else if (emmc_size<Double.parseDouble(paras[0])){
				result = "FAILED";
				errorcode=1;
			}
			else {
				result = "FAILED";
				errorcode=2;
			}

			

		} catch (IOException e) {
			e.printStackTrace();
		}
			catch (NumberFormatException ex){
				result="FAILED";
				errorcode=0;
			}
		
		
		try {
			BufferedWriter bw = new BufferedWriter(new FileWriter(outputfile,true));
			bw.write("EMMC="+size+" KB\r\n");
			System.out.println("EMMC="+size+" KB");
			bw.write("EMMC_Result="+result+"\r\n");
			System.out.println("EMMC_Result="+result);
			if (result.equals("FAILED")){
				NumberFormat nf = NumberFormat.getIntegerInstance();
				nf.setMinimumIntegerDigits(2);
				bw.write("Error_Code= "+nf.format(errornum)+nf.format(errorcode)+"\r\n");
				System.out.println("Error_Code= "+nf.format(errornum)+nf.format(errorcode));
			}
			bw.flush();
			bw.close();
		}catch (Exception e){
			e.printStackTrace();
		}
		return true;
	}