aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/utils/NetworkUtils.java
diff options
context:
space:
mode:
authornextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-06-05 10:36:43 +0100
committernextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com>2022-06-05 10:36:43 +0100
commit087f5404658a1543834f16a89e3436f8399297f6 (patch)
tree4b6d18abbc2e6f3083e664786dbbef98bb142a33 /src/main/java/cc/polyfrost/oneconfig/utils/NetworkUtils.java
parent3e472ea407d128de61820fc167e08b8fe24186c9 (diff)
downloadOneConfig-087f5404658a1543834f16a89e3436f8399297f6.tar.gz
OneConfig-087f5404658a1543834f16a89e3436f8399297f6.tar.bz2
OneConfig-087f5404658a1543834f16a89e3436f8399297f6.zip
Reformat code and OC-38
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/utils/NetworkUtils.java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/utils/NetworkUtils.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/utils/NetworkUtils.java b/src/main/java/cc/polyfrost/oneconfig/utils/NetworkUtils.java
index 767f36f..aea7812 100644
--- a/src/main/java/cc/polyfrost/oneconfig/utils/NetworkUtils.java
+++ b/src/main/java/cc/polyfrost/oneconfig/utils/NetworkUtils.java
@@ -18,9 +18,10 @@ public final class NetworkUtils {
/**
* Gets the contents of a URL as a String.
- * @param url The URL to read.
+ *
+ * @param url The URL to read.
* @param userAgent The user agent to use.
- * @param timeout The timeout in milliseconds.
+ * @param timeout The timeout in milliseconds.
* @param useCaches Whether to use caches.
* @return The contents of the URL.
*/
@@ -47,9 +48,9 @@ public final class NetworkUtils {
/**
* Gets the contents of a URL as a JsonElement.
*
- * @param url The URL to read.
+ * @param url The URL to read.
* @param userAgent The user agent to use.
- * @param timeout The timeout in milliseconds.
+ * @param timeout The timeout in milliseconds.
* @param useCaches Whether to use caches.
* @return The contents of the URL.
* @see NetworkUtils#getString(String, String, int, boolean)
@@ -72,10 +73,11 @@ public final class NetworkUtils {
/**
* Downloads a file from a URL.
- * @param url The URL to download from.
- * @param file The file to download to.
+ *
+ * @param url The URL to download from.
+ * @param file The file to download to.
* @param userAgent The user agent to use.
- * @param timeout The timeout in milliseconds.
+ * @param timeout The timeout in milliseconds.
* @param useCaches Whether to use caches.
* @return Whether the download was successful.
*/
@@ -92,7 +94,8 @@ public final class NetworkUtils {
/**
* Downloads a file from a URL.
- * @param url The URL to download from.
+ *
+ * @param url The URL to download from.
* @param file The file to download to.
* @return Whether the download was successful.
* @see NetworkUtils#downloadFile(String, File, String, int, boolean)
@@ -103,6 +106,7 @@ public final class NetworkUtils {
/**
* Gets the SHA-256 hash of a file.
+ *
* @param file The file to hash.
* @return The SHA-256 hash of the file.
*/