Class HttpUtil

java.lang.Object
net.minecraft.util.HttpUtil

public class HttpUtil extends Object
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • HttpUtil

      private HttpUtil()
  • Method Details

    • downloadFile

      public static Path downloadFile(Path pSaveFile, URL pUrl, Map<String,String> pRequestProperties, com.google.common.hash.HashFunction pHashFunction, @Nullable com.google.common.hash.HashCode pHash, int pMaxSize, Proxy pProxy, HttpUtil.DownloadProgressListener pProgressListener)
    • updateModificationTime

      private static void updateModificationTime(Path pPath)
    • 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

      private static Path cachedFilePath(Path pPath, com.google.common.hash.HashCode pHash)
    • 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)