public final class Manifest extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static String |
MANIFEST_URL |
Defines the default location from which this manifest can typically be retrieved.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
Manifest(Map<String,String> latestVersions,
Set<VersionReference> references) |
|
|
Manifest(VersionReference latestStable,
VersionReference latestSnapshot,
Map<String,VersionReference> versionMap) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(Object o) |
|
static Manifest |
fetch() |
Fetches the current version manifest from the servers.
|
VersionReference |
getLatestSnapshot() |
Retrieves an excerpt of the latest snapshot version.
|
VersionReference |
getLatestStable() |
Retrieves an excerpt of the latest stable version.
|
Optional<VersionReference> |
getVersion(String versionId) |
Retrieves an excerpt of a specific version (if known).
|
Set<VersionReference> |
getVersions() |
Retrieves a set of available versions (and their respective excerpts).
|
int |
hashCode() |
|
static Manifest |
read(InputStream inputStream) |
Decodes a launcher version manifest from the specified input stream.
|
static Manifest |
read(Reader reader) |
Decodes a launcher version manifest from the specified reader.
|
static Manifest |
read(Path path) |
Decodes a launcher version manifest from the specified file.
|
public static final String MANIFEST_URL
public Manifest(@NonNull
VersionReference latestStable,
@NonNull
VersionReference latestSnapshot,
@NonNull
Map<String,VersionReference> versionMap)
protected Manifest(@NonNull
Map<String,String> latestVersions,
@NonNull
Set<VersionReference> references)
@NonNull public static Manifest fetch() throws IOException
IOException - when the server response is invalid (e.g. when any type of error code is
sent), no connection can be established or the data is malformed.@NonNull public VersionReference getLatestStable()
@NonNull public VersionReference getLatestSnapshot()
@NonNull public Optional<VersionReference> getVersion(@NonNull String versionId)
versionId - a version identifier.@NonNull public Set<VersionReference> getVersions()
@NonNull public static Manifest read(@NonNull InputStream inputStream) throws IOException
inputStream - an input stream.IOException - when reading from the input stream fails or the data is malformed.@NonNull public static Manifest read(@NonNull Path path) throws IOException
path - a file path.IOException - when reading from the file fails or the data is malformed.@NonNull public static Manifest read(@NonNull Reader reader) throws IOException
reader - a reader.IOException - when reading from the file fails or the data is malformed.Copyright © 2018 Basin. All rights reserved.