Class MCP
java.lang.Object
fr.flowarg.flowupdater.download.json.MCP
This class represents an MCP object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the client sha1.longReturn the client size.Return the client url.static @NotNull MCPgetMCPFromJson(String jsonUrl) Provide an MCP instance from a JSON file.static @NotNull MCPgetMCPFromJson(URL jsonUrl) Provide an MCP instance from a JSON file.
-
Constructor Details
-
MCP
Construct a new MCP object.- Parameters:
clientURL- URL of client.jarclientSha1- SHA1 of client.jarclientSize- Size (bytes) of client.jar
-
-
Method Details
-
getMCPFromJson
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
Provide an MCP instance from a JSON file.- Parameters:
jsonUrl- the JSON file URL.- Returns:
- the MCP instance.
-
getClientURL
Return the client url.- Returns:
- the client url.
-
getClientSha1
Return the client sha1.- Returns:
- the client sha1.
-
getClientSize
public long getClientSize()Return the client size.- Returns:
- the client size.
-