Package net.minecraft.util
Class NetworkUtils
java.lang.Object
net.minecraft.util.NetworkUtils
A few networking utilities.
- Mappings:
Namespace Name official aufintermediary net/minecraft/class_3521named net/minecraft/util/NetworkUtils
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Pathdownload(Path path, URL url, Map<String, String> headers, HashFunction hashFunction, @Nullable HashCode hashCode, int maxBytes, Proxy proxy, NetworkUtils.DownloadListener listener) static intprivate static HashCodehash(Path path, HashFunction hashFunction) static booleanisPortAvailable(int port) private static Pathprivate static voidupdateModificationTime(Path path) private static booleanvalidateHash(Path path, HashFunction hashFunction, HashCode hashCode) private static HashCodewrite(HashFunction hashFunction, int maxBytes, NetworkUtils.DownloadListener listener, InputStream stream, Path path)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official aLauf;a:Lorg/slf4j/Logger;intermediary field_15665Lnet/minecraft/class_3521;field_15665:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/util/NetworkUtils;LOGGER:Lorg/slf4j/Logger;
-
-
Constructor Details
-
NetworkUtils
private NetworkUtils()
-
-
Method Details
-
download
public static Path download(Path path, URL url, Map<String, String> headers, HashFunction hashFunction, @Nullable @Nullable HashCode hashCode, int maxBytes, Proxy proxy, NetworkUtils.DownloadListener listener) - Mappings:
Namespace Name Mixin selector official aLauf;a(Ljava/nio/file/Path;Ljava/net/URL;Ljava/util/Map;Lcom/google/common/hash/HashFunction;Lcom/google/common/hash/HashCode;ILjava/net/Proxy;Lauf$a;)Ljava/nio/file/Path;intermediary method_55496Lnet/minecraft/class_3521;method_55496(Ljava/nio/file/Path;Ljava/net/URL;Ljava/util/Map;Lcom/google/common/hash/HashFunction;Lcom/google/common/hash/HashCode;ILjava/net/Proxy;Lnet/minecraft/class_3521$class_9034;)Ljava/nio/file/Path;named downloadLnet/minecraft/util/NetworkUtils;download(Ljava/nio/file/Path;Ljava/net/URL;Ljava/util/Map;Lcom/google/common/hash/HashFunction;Lcom/google/common/hash/HashCode;ILjava/net/Proxy;Lnet/minecraft/util/NetworkUtils$DownloadListener;)Ljava/nio/file/Path;
-
updateModificationTime
- Mappings:
Namespace Name Mixin selector official aLauf;a(Ljava/nio/file/Path;)Vintermediary method_55603Lnet/minecraft/class_3521;method_55603(Ljava/nio/file/Path;)Vnamed updateModificationTimeLnet/minecraft/util/NetworkUtils;updateModificationTime(Ljava/nio/file/Path;)V
-
hash
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLauf;a(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;intermediary method_55494Lnet/minecraft/class_3521;method_55494(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;named hashLnet/minecraft/util/NetworkUtils;hash(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;
-
validateHash
private static boolean validateHash(Path path, HashFunction hashFunction, HashCode hashCode) throws IOException - Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLauf;a(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;Lcom/google/common/hash/HashCode;)Zintermediary method_55495Lnet/minecraft/class_3521;method_55495(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;Lcom/google/common/hash/HashCode;)Znamed validateHashLnet/minecraft/util/NetworkUtils;validateHash(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;Lcom/google/common/hash/HashCode;)Z
-
resolve
- Mappings:
Namespace Name Mixin selector official aLauf;a(Ljava/nio/file/Path;Lcom/google/common/hash/HashCode;)Ljava/nio/file/Path;intermediary method_55493Lnet/minecraft/class_3521;method_55493(Ljava/nio/file/Path;Lcom/google/common/hash/HashCode;)Ljava/nio/file/Path;named resolveLnet/minecraft/util/NetworkUtils;resolve(Ljava/nio/file/Path;Lcom/google/common/hash/HashCode;)Ljava/nio/file/Path;
-
write
private static HashCode write(HashFunction hashFunction, int maxBytes, NetworkUtils.DownloadListener listener, InputStream stream, Path path) throws IOException - Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLauf;a(Lcom/google/common/hash/HashFunction;ILauf$a;Ljava/io/InputStream;Ljava/nio/file/Path;)Lcom/google/common/hash/HashCode;intermediary method_55492Lnet/minecraft/class_3521;method_55492(Lcom/google/common/hash/HashFunction;ILnet/minecraft/class_3521$class_9034;Ljava/io/InputStream;Ljava/nio/file/Path;)Lcom/google/common/hash/HashCode;named writeLnet/minecraft/util/NetworkUtils;write(Lcom/google/common/hash/HashFunction;ILnet/minecraft/util/NetworkUtils$DownloadListener;Ljava/io/InputStream;Ljava/nio/file/Path;)Lcom/google/common/hash/HashCode;
-
findLocalPort
public static int findLocalPort()- Mappings:
Namespace Name Mixin selector official aLauf;a()Iintermediary method_15302Lnet/minecraft/class_3521;method_15302()Inamed findLocalPortLnet/minecraft/util/NetworkUtils;findLocalPort()I
-
isPortAvailable
public static boolean isPortAvailable(int port) - Mappings:
Namespace Name Mixin selector official aLauf;a(I)Zintermediary method_46872Lnet/minecraft/class_3521;method_46872(I)Znamed isPortAvailableLnet/minecraft/util/NetworkUtils;isPortAvailable(I)Z
-