Klasse NetworkHandler

java.lang.Object
de.bytestore.hostinger.handler.NetworkHandler

public class NetworkHandler extends Object
  • Konstruktordetails

    • NetworkHandler

      public NetworkHandler()
  • Methodendetails

    • parsePorts

      public static List<Integer> parsePorts(String formatIO)
      Parses the formatIO string and generates a list of ports based on the given port inputs.
      Parameter:
      formatIO - A string representing the port inputs. The string may contain single port numbers or port ranges specified in the format "start-end", separated by commas.
      Gibt zurück:
      A list of integers representing the generated ports.
    • generatePorts

      public static List<Integer> generatePorts(String[] portInputs)
      Generates a list of ports based on the given port inputs.
      Parameter:
      portInputs - An array of strings representing the port inputs. The array may contain single port numbers or port ranges specified in the format "start-end".
      Gibt zurück:
      A list of integers representing the generated ports.
    • generateMAC

      public static String generateMAC()
      Generates a random MAC address.
      Gibt zurück:
      The randomly generated MAC address.
    • downloadFile

      public static void downloadFile(String urlIO, String destinationIO, DownloadCallback callbackIO)
      Downloads a file from the given URL to the specified destination.
      Parameter:
      urlIO - The URL of the file to download.
      destinationIO - The destination path to save the downloaded file.
      callbackIO -
      Löst aus:
      IOException - If an I/O error occurs during the download process.