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 pPath, com.google.common.hash.HashCode pHash) private static boolean
checkExistingFile
(Path pPath, com.google.common.hash.HashFunction pHashFunction, com.google.common.hash.HashCode pExpectedHash) private static com.google.common.hash.HashCode
downloadAndHash
(com.google.common.hash.HashFunction pHashFuntion, int pMaxSize, HttpUtil.DownloadProgressListener pProgressListener, InputStream pStream, Path pOutputPath) static Path
downloadFile
(Path pSaveFile, URL pUrl, Map<String, String> pRequestProperties, com.google.common.hash.HashFunction pHashFunction, com.google.common.hash.HashCode pHash, int pMaxSize, Proxy pProxy, HttpUtil.DownloadProgressListener pProgressListener) static int
private static com.google.common.hash.HashCode
static boolean
isPortAvailable
(int pPort) private static void
updateModificationTime
(Path pPath)
-
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 pPath, com.google.common.hash.HashFunction pHashFunction) throws IOException - Throws:
IOException
-
checkExistingFile
private static boolean checkExistingFile(Path pPath, com.google.common.hash.HashFunction pHashFunction, com.google.common.hash.HashCode pExpectedHash) throws IOException - Throws:
IOException
-
cachedFilePath
-
downloadAndHash
private static com.google.common.hash.HashCode downloadAndHash(com.google.common.hash.HashFunction pHashFuntion, int pMaxSize, HttpUtil.DownloadProgressListener pProgressListener, InputStream pStream, Path pOutputPath) throws IOException - Throws:
IOException
-
getAvailablePort
public static int getAvailablePort() -
isPortAvailable
public static boolean isPortAvailable(int pPort)
-