public static byte[] readFile(String file) {
		File f = new File(file);
		if(!f.exists()) {
			//log: warning, while the exact file doesn't exist, receive
			//a read command.
			return null;
		}
		byte[] res = null;
		InputStream in = null;
		try{
			in = new FileInputStream(f);
			byte[] tmpArr = new byte[1000];
			int readNum = in.read(tmpArr);
			while(readNum == 1000){
				if(res == null){
					res = tmpArr;
				}
				else {
					FuncUtil.concat(res, tmpArr);
				}
				readNum = in.read(tmpArr);
			}
			if(readNum > 0) {
				byte[] tail = Arrays.copyOf(tmpArr, readNum);
				FuncUtil.concat(res, tail);
			}
		}
		catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		catch(IOException e) {
			e.printStackTrace();
		}
		finally {
			try{
				if (in != null)
					in.close();		
			}
			catch (IOException e) {
				e.printStackTrace();
			}
		}
		return res;
	}