Class UrlUtils

java.lang.Object
io.github.yvasyliev.forwarder.telegram.reddit.util.UrlUtils

public final class UrlUtils extends Object
Utility class for URL-related operations.
  • Method Details

    • openStream

      public static InputStream openStream(URL url) throws IOException
      Opens an InputStream from the given URL.
      Parameters:
      url - the URL to open the stream from
      Returns:
      the opened InputStream
      Throws:
      IOException - if an I/O error occurs
    • getFileName

      public static String getFileName(URL url)
      Extracts the file name from the given URL.
      Parameters:
      url - the URL to extract the file name from
      Returns:
      the extracted file name