java.lang.Object
fr.flowarg.flowupdater.download.json.MCP

public class MCP extends Object
This class represents an MCP object.
  • Constructor Details

    • MCP

      public MCP(String clientURL, String clientSha1, long clientSize)
      Construct a new MCP object.
      Parameters:
      clientURL - URL of client.jar
      clientSha1 - SHA1 of client.jar
      clientSize - Size (bytes) of client.jar
  • Method Details

    • getMCPFromJson

      @NotNull public static @NotNull MCP getMCPFromJson(URL jsonUrl)
      Provide an MCP instance from a JSON file. Template of a JSON file :
       {
         "clientURL": "https://url.com/launcher/client.jar",
         "clientSha1": "9b0a9d70320811e7af2e8741653f029151a6719a",
         "clientSize": 1234
       }
       
      Parameters:
      jsonUrl - the JSON file URL.
      Returns:
      the MCP instance.
    • getMCPFromJson

      @NotNull public static @NotNull MCP getMCPFromJson(String jsonUrl)
      Provide an MCP instance from a JSON file.
      Parameters:
      jsonUrl - the JSON file URL.
      Returns:
      the MCP instance.
    • getClientURL

      public String getClientURL()
      Return the client url.
      Returns:
      the client url.
    • getClientSha1

      public String getClientSha1()
      Return the client sha1.
      Returns:
      the client sha1.
    • getClientSize

      public long getClientSize()
      Return the client size.
      Returns:
      the client size.