public class URLConnections extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
URLConnections.DownloadCopyListener |
| Modifier and Type | Field and Description |
|---|---|
static String |
USE_ENV_PROXY_SELECTOR |
| Constructor and Description |
|---|
URLConnections() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
downloadIntoByteArray(URLConnection connection) |
static byte[] |
downloadIntoByteArray(URLConnection connection,
URLConnections.DownloadCopyListener copyListener) |
static void |
downloadIntoFile(URLConnection connection,
Path destination,
URLConnections.DownloadCopyListener copyListener) |
static Path |
downloadIntoTempFile(URLConnection connection) |
static Path |
downloadIntoTempFile(URLConnection connection,
URLConnections.DownloadCopyListener copyListener) |
protected static <E extends Exception> |
downloadTo(URLConnection connection,
Path destination,
ThrowingFunction<URLConnection,Path,E> urlToTempFile) |
protected static void |
move(Path tempFile,
Path destination) |
static URLConnection |
urlConnectionOf(URL url) |
static URLConnection |
urlConnectionOf(URL url,
Proxy proxy) |
public static final String USE_ENV_PROXY_SELECTOR
public static URLConnection urlConnectionOf(URL url) throws IOException
IOExceptionpublic static URLConnection urlConnectionOf(URL url, Proxy proxy) throws IOException
IOExceptionpublic static byte[] downloadIntoByteArray(URLConnection connection) throws IOException
IOExceptionpublic static byte[] downloadIntoByteArray(URLConnection connection, URLConnections.DownloadCopyListener copyListener) throws IOException
IOExceptionpublic static void downloadIntoFile(URLConnection connection, Path destination, URLConnections.DownloadCopyListener copyListener) throws IOException
IOExceptionpublic static Path downloadIntoTempFile(URLConnection connection) throws IOException
IOExceptionpublic static Path downloadIntoTempFile(URLConnection connection, URLConnections.DownloadCopyListener copyListener) throws IOException
IOExceptionprotected static <E extends Exception> void downloadTo(URLConnection connection, Path destination, ThrowingFunction<URLConnection,Path,E> urlToTempFile) throws IOException, E extends Exception
IOExceptionE extends Exceptionprotected static void move(Path tempFile, Path destination) throws IOException
IOExceptionCopyright © 2025. All rights reserved.