Class HttpDownloadUtils

java.lang.Object
com.ultikits.ultitools.utils.HttpDownloadUtils

public class HttpDownloadUtils extends Object
Utility class for HTTP file download operations. Provides methods to download files from URLs with progress tracking support.
Since:
6.0.0
Author:
wisdomme
  • Constructor Details

    • HttpDownloadUtils

      public HttpDownloadUtils()
  • Method Details

    • download

      public static void download(String urlString, String fileName, String savePath) throws IOException
      Download file from URL.
      Parameters:
      urlString - Download URL
      fileName - File name
      savePath - Save path
      Throws:
      IOException - if an I/O error occurs during download
    • download

      public static void download(String urlString, String fileName, String savePath, HttpDownloadUtils.ProgressCallback progressCallback) throws IOException
      Download file from URL with progress callback.
      Parameters:
      urlString - Download URL
      fileName - File name
      savePath - Save path
      progressCallback - Progress callback
      Throws:
      IOException - if an I/O error occurs during download
    • downloadToByteArray

      public static byte[] downloadToByteArray(String urlString) throws IOException
      Download content from URL to byte array.
      Parameters:
      urlString - Download URL
      Returns:
      Downloaded content as byte array
      Throws:
      IOException - if an I/O error occurs during download