Package de.bytestore.hostinger.handler
Klasse NetworkHandler
java.lang.Object
de.bytestore.hostinger.handler.NetworkHandler
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic voiddownloadFile(String urlIO, String destinationIO, DownloadCallback callbackIO) Downloads a file from the given URL to the specified destination.static StringGenerates a random MAC address.generatePorts(String[] portInputs) Generates a list of ports based on the given port inputs.parsePorts(String formatIO) Parses the formatIO string and generates a list of ports based on the given port inputs.
-
Konstruktordetails
-
NetworkHandler
public NetworkHandler()
-
-
Methodendetails
-
parsePorts
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
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
Generates a random MAC address.- Gibt zurück:
- The randomly generated MAC address.
-
downloadFile
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.
-