code: static public String fileToString(String file, String encoding)
  			throws Exception {
  		FileInputStream fis = new FileInputStream(file);
  		ByteArrayOutputStream baos = new ByteArrayOutputStream();
  		byte[] buffer = new byte[10240];
  		int len = fis.read(buffer, 0, buffer.length);
  		while (len > 0) {
  			baos.write(buffer, 0, len);
  			len = fis.read(buffer, 0, buffer.length);
  		}
  		fis.close();
  
  		return baos.toString(encoding);
  	}
docs: 将文件内容作为一个字符串返回
  
  @param file
  @param encoding
  @return
  @throws Exception