Exemplo n.º 1
0
  /**
   * @param is
   * @param upToken
   * @param key
   * @param mimeType
   * @param streamLength
   * @return 获得upload后执行execute方法,返回 CallRet upload。execute()
   */
  public static StreamSliceUpload upload(
      InputStream is, String upToken, String key, String mimeType, long streamLength) {
    StreamSliceUpload upload = new StreamSliceUpload(is, upToken, key, mimeType, streamLength);

    upload.httpClient = Http.getClient();

    return upload;
  }
Exemplo n.º 2
0
  /**
   * @param file
   * @param upToken
   * @param key
   * @param mimeType
   * @param resumeClass
   * @return 获得upload后执行execute方法,返回 CallRet upload。execute()
   */
  public static RandomAccessFileUpload upload(
      File file, String upToken, String key, String mimeType) {
    RandomAccessFileUpload upload = new RandomAccessFileUpload(file, upToken, key, mimeType);

    upload.httpClient = Http.getClient();

    return upload;
  }