code: public static String file(File file) throws IOException {
          InputStream in = null;
          try {
              in = new FileInputStream(file);
              return stream(in, file.length());
          } finally {
              if (in != null) {
                  try {
                      in.close();
                  } catch (Exception e) {
                      e.printStackTrace();
                  }
              }
          }
      }
docs: 计算文件内容的etag
  
  @param file 文件对象
  @return 文件内容的etag
  @throws IOException 文件读取异常