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 PathcachedFilePath(Path path, com.google.common.hash.HashCode hash) private static booleancheckExistingFile(Path path, com.google.common.hash.HashFunction hashFunction, com.google.common.hash.HashCode expectedHash) private static com.google.common.hash.HashCodedownloadAndHash(com.google.common.hash.HashFunction hashFuntion, int maxSize, HttpUtil.DownloadProgressListener progressListener, InputStream stream, Path outputPath) static PathdownloadFile(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 intprivate static com.google.common.hash.HashCodestatic booleanisPortAvailable(int port) private static voidupdateModificationTime(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)
-