public class AssetIndex extends Object
| Constructor | Description |
|---|---|
AssetIndex(Map<String,AssetObject> objects) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(Object o) |
|
Optional<AssetObject> |
getObject(String path) |
Retrieves a specific object from the index.
|
Map<String,AssetObject> |
getObjects() |
|
int |
hashCode() |
|
static AssetIndex |
read(InputStream inputStream) |
Decodes an asset index from the specified input stream.
|
static AssetIndex |
read(Reader reader) |
Decodes an asset index from the specified reader.
|
static AssetIndex |
read(Path path) |
Decodes an asset index from the specified file.
|
public AssetIndex(@NonNull
Map<String,AssetObject> objects)
@NonNull public Optional<AssetObject> getObject(@NonNull String path)
path - a relative path.@NonNull public Map<String,AssetObject> getObjects()
@NonNull public static AssetIndex 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 AssetIndex 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 AssetIndex 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.