Package net.minecraft.util
Class NetworkUtils
java.lang.Object
net.minecraft.util.NetworkUtils
A few networking utilities.
- Mappings:
Namespace Name named net/minecraft/util/NetworkUtilsintermediary net/minecraft/class_3521official ayf
-
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 named LOGGERLnet/minecraft/util/NetworkUtils;LOGGER:Lorg/slf4j/Logger;intermediary field_15665Lnet/minecraft/class_3521;field_15665:Lorg/slf4j/Logger;official aLayf;a: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 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;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;official aLayf;a(Ljava/nio/file/Path;Ljava/net/URL;Ljava/util/Map;Lcom/google/common/hash/HashFunction;Lcom/google/common/hash/HashCode;ILjava/net/Proxy;Layf$a;)Ljava/nio/file/Path;
-
updateModificationTime
- Mappings:
Namespace Name Mixin selector named updateModificationTimeLnet/minecraft/util/NetworkUtils;updateModificationTime(Ljava/nio/file/Path;)Vintermediary method_55603Lnet/minecraft/class_3521;method_55603(Ljava/nio/file/Path;)Vofficial aLayf;a(Ljava/nio/file/Path;)V
-
hash
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named hashLnet/minecraft/util/NetworkUtils;hash(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;official aLayf;a(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 named validateHashLnet/minecraft/util/NetworkUtils;validateHash(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;)Zofficial aLayf;a(Ljava/nio/file/Path;Lcom/google/common/hash/HashFunction;Lcom/google/common/hash/HashCode;)Z
-
resolve
- Mappings:
Namespace Name Mixin selector named resolveLnet/minecraft/util/NetworkUtils;resolve(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;official aLayf;a(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 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;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;official aLayf;a(Lcom/google/common/hash/HashFunction;ILayf$a;Ljava/io/InputStream;Ljava/nio/file/Path;)Lcom/google/common/hash/HashCode;
-
findLocalPort
public static int findLocalPort()- Mappings:
Namespace Name Mixin selector named findLocalPortLnet/minecraft/util/NetworkUtils;findLocalPort()Iintermediary method_15302Lnet/minecraft/class_3521;method_15302()Iofficial aLayf;a()I
-
isPortAvailable
public static boolean isPortAvailable(int port) - Mappings:
Namespace Name Mixin selector named isPortAvailableLnet/minecraft/util/NetworkUtils;isPortAvailable(I)Zintermediary method_46872Lnet/minecraft/class_3521;method_46872(I)Zofficial aLayf;a(I)Z
-