public static byte[] readFile(String dir, String filename)
	{
		FileInputStream fileInputStream=null;
		 
        File file = new File(dir+"/"+filename);
 
        byte[] bFile = new byte[(int) file.length()];
 
        try {
        	fileInputStream = new FileInputStream(file);
        	fileInputStream.read(bFile);
        	fileInputStream.close();
	    
	    	return bFile;
        }catch(IOException e){
        	return null;
        }
	}