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 saveFile, URL url, Map<String,String> requestProperties, com.google.common.hash.HashFunction hashFunction, @Nullable com.google.common.hash.HashCode hash, int maxSize, Proxy proxy, HttpUtil.DownloadProgressListener progressListener)
    • updateModificationTime

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

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