public class IoUtil extends Object
Constructor and Description |
---|
IoUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
download(io.fabric8.maven.docker.util.Logger log,
URL downloadUrl,
File target)
Download with showing the progress a given URL and store it in a file
|
static int |
getFreeRandomPort()
Find a free (on localhost) random port in the range [49152, 65535] after 100 attempts.
|
static int |
getFreeRandomPort(int min,
int max,
int attempts)
Find a free (on localhost) random port in the specified range after the given number of attempts.
|
static String |
sanitizeFileName(String name)
Returns an identifier from the given string that can be used as file name.
|
public static void download(io.fabric8.maven.docker.util.Logger log, URL downloadUrl, File target) throws org.apache.maven.plugin.MojoExecutionException
log
- logger used to track progressdownloadUrl
- url to downloadtarget
- target file where to store the downloaded dataorg.apache.maven.plugin.MojoExecutionException
public static int getFreeRandomPort()
public static int getFreeRandomPort(int min, int max, int attempts)
Copyright © 2020. All rights reserved.