Package net.minecraft.util
Class NetworkUtils
java.lang.Object
net.minecraft.util.NetworkUtils
A few networking utilities.
- Mappings:
Namespace Name official auf
intermediary net/minecraft/class_3521
named net/minecraft/util/NetworkUtils
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Path
download
(Path path, URL url, Map<String, String> headers, HashFunction hashFunction, @Nullable HashCode hashCode, int maxBytes, Proxy proxy, NetworkUtils.DownloadListener listener) static int
private static HashCode
hash
(Path path, HashFunction hashFunction) static boolean
isPortAvailable
(int port) private static Path
private static void
updateModificationTime
(Path path) private static boolean
validateHash
(Path path, HashFunction hashFunction, HashCode hashCode) private static HashCode
write
(HashFunction hashFunction, int maxBytes, NetworkUtils.DownloadListener listener, InputStream stream, Path path)
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official a
Lauf;a:Lorg/slf4j/Logger;
intermediary field_15665
Lnet/minecraft/class_3521;field_15665:Lorg/slf4j/Logger;
named LOGGER
Lnet/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 a
Lauf;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_55496
Lnet/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 download
Lnet/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 a
Lauf;a(Ljava/nio/file/Path;)V
intermediary method_55603
Lnet/minecraft/class_3521;method_55603(Ljava/nio/file/Path;)V
named updateModificationTime
Lnet/minecraft/util/NetworkUtils;updateModificationTime(Ljava/nio/file/Path;)V
-
hash
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official a
Lauf;a(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;
intermediary method_55494
Lnet/minecraft/class_3521;method_55494(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;
named hash
Lnet/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 a
Lauf;a(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;Lcom/google/common/hash/HashCode;)Z
intermediary method_55495
Lnet/minecraft/class_3521;method_55495(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;Lcom/google/common/hash/HashCode;)Z
named validateHash
Lnet/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 a
Lauf;a(Ljava/nio/file/Path;Lcom/google/common/hash/HashCode;)Ljava/nio/file/Path;
intermediary method_55493
Lnet/minecraft/class_3521;method_55493(Ljava/nio/file/Path;Lcom/google/common/hash/HashCode;)Ljava/nio/file/Path;
named resolve
Lnet/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 a
Lauf;a(Lcom/google/common/hash/HashFunction;ILauf$a;Ljava/io/InputStream;Ljava/nio/file/Path;)Lcom/google/common/hash/HashCode;
intermediary method_55492
Lnet/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 write
Lnet/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 a
Lauf;a()I
intermediary method_15302
Lnet/minecraft/class_3521;method_15302()I
named findLocalPort
Lnet/minecraft/util/NetworkUtils;findLocalPort()I
-
isPortAvailable
public static boolean isPortAvailable(int port) - Mappings:
Namespace Name Mixin selector official a
Lauf;a(I)Z
intermediary method_46872
Lnet/minecraft/class_3521;method_46872(I)Z
named isPortAvailable
Lnet/minecraft/util/NetworkUtils;isPortAvailable(I)Z
-