Package net.minecraft.util
Class HttpUtil
java.lang.Object
net.minecraft.util.HttpUtil
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Path
cachedFilePath
(Path path, com.google.common.hash.HashCode hash) private static boolean
checkExistingFile
(Path path, com.google.common.hash.HashFunction hashFunction, com.google.common.hash.HashCode expectedHash) private static com.google.common.hash.HashCode
downloadAndHash
(com.google.common.hash.HashFunction hashFuntion, int maxSize, HttpUtil.DownloadProgressListener progressListener, InputStream stream, Path outputPath) static Path
downloadFile
(Path saveFile, URL url, Map<String, String> requestProperties, com.google.common.hash.HashFunction hashFunction, com.google.common.hash.HashCode hash, int maxSize, Proxy proxy, HttpUtil.DownloadProgressListener progressListener) static int
private static com.google.common.hash.HashCode
static boolean
isPortAvailable
(int port) private static void
updateModificationTime
(Path path)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
HttpUtil
private HttpUtil()
-
-
Method Details
-
downloadFile
-
updateModificationTime
-
hashFile
private static com.google.common.hash.HashCode hashFile(Path path, com.google.common.hash.HashFunction hashFunction) throws IOException - Throws:
IOException
-
checkExistingFile
private static boolean checkExistingFile(Path path, com.google.common.hash.HashFunction hashFunction, com.google.common.hash.HashCode expectedHash) throws IOException - Throws:
IOException
-
cachedFilePath
-
downloadAndHash
private static com.google.common.hash.HashCode downloadAndHash(com.google.common.hash.HashFunction hashFuntion, int maxSize, HttpUtil.DownloadProgressListener progressListener, InputStream stream, Path outputPath) throws IOException - Throws:
IOException
-
getAvailablePort
public static int getAvailablePort() -
isPortAvailable
public static boolean isPortAvailable(int port)
-