public static boolean writeFile(String dir, String filename, byte[] bFile)
	{
		
		FileOutputStream fileOuputStream = null;
 
        try {
        	fileOuputStream = new FileOutputStream(dir+"/"+filename); 
        	fileOuputStream.write(bFile);
        	fileOuputStream.close();
	    
	    	return true;
        }catch(IOException e){
        	return false;
        }
	}