code: public DownloadMediaResponse download(String mediaId){
          DownloadMediaResponse response = new DownloadMediaResponse();
          String url = BASE_API_URL + "cgi-bin/media/get?access_token=" + config.getAccessToken() + "&media_id=" + mediaId;
          RequestConfig config = RequestConfig.custom().setConnectionRequestTimeout(NetWorkCenter.CONNECT_TIMEOUT).setConnectTimeout(NetWorkCenter.CONNECT_TIMEOUT).setSocketTimeout(NetWorkCenter.CONNECT_TIMEOUT).build();
          CloseableHttpClient client = HttpClientBuilder.create().setDefaultRequestConfig(config).build();
          HttpGet get = new HttpGet(url);
          try{
              CloseableHttpResponse r = client.execute(get);
              if(HttpStatus.SC_OK == r.getStatusLine().getStatusCode()){
                  InputStream inputStream = r.getEntity().getContent();
                  Header[] headers = r.getHeaders("Content-disposition");
                  if (null != headers && 0 != headers.length) {
                      Header length = r.getHeaders("Content-Length")[0];
                      response.setContent(inputStream, Integer.valueOf(length.getValue()));
                      response.setFileName(headers[0].getElements()[0].getParameterByName("filename").getValue());
                  } else {
                      ByteArrayOutputStream out = new ByteArrayOutputStream();
                      StreamUtil.copy(inputStream, out);
                      String json = out.toString();
                      response = JSONUtil.toBean(json, DownloadMediaResponse.class);
                  }
              }
          } catch (Exception e) {
              LOG.error("异常", e);
          }finally {
              try{
                  client.close();
              }catch (IOException e){
                  LOG.error("异常", e);
              }
          }
          return response;
      }
docs: 下载媒体文件
  @param mediaId 媒体ID
  @return 下载结果