public class AssetsImpl
extends java.lang.Object
retain
method)
the asset data is stored in ~/.physpics/assets/package.name/assetname
backup copies of the asset tree are in the jar file
and on the webpage. In case one or more copies of the asset
are absent, it is sought in another of its posible locations.Modifier and Type | Class and Description |
---|---|
static class |
AssetsImpl.Locations |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SLASH |
Constructor and Description |
---|
AssetsImpl() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
fetch(AssetsImpl.Locations locs,
java.lang.String assetName)
Fetch an asset from the most available of its sources.
|
static IOUtils.InfoInputStream |
fetchInputStream(AssetsImpl.Locations locs,
java.lang.String assetName)
Fetch an InfoInputStream for an asset from
the most available of its sources.
|
static Reader |
fetchReader(AssetsImpl.Locations locs,
java.lang.String assetName,
java.nio.charset.Charset chset)
Fetch a Reader for an asset from
the most available of its sources.
|
static File |
getRetentionFile(AssetsImpl.Locations locs,
java.lang.String assetName)
Get a File into which to store an asset.
|
static boolean |
retain(AssetsImpl.Locations locs,
java.lang.String assetName,
java.lang.String contents)
Save an asset of String type.
|
public static java.lang.String fetch(AssetsImpl.Locations locs, java.lang.String assetName)
locs
- parameters for various of the possible locationsassetName
- Asset's filenamepublic static IOUtils.InfoInputStream fetchInputStream(AssetsImpl.Locations locs, java.lang.String assetName)
locs
- parameters for various of the possible locationsassetName
- Asset's filenamepublic static Reader fetchReader(AssetsImpl.Locations locs, java.lang.String assetName, java.nio.charset.Charset chset)
locs
- parameters for various of the possible locationsassetName
- Asset's filenamechset
- The character set to use. null means UTF-8public static File getRetentionFile(AssetsImpl.Locations locs, java.lang.String assetName)
locs
- parameters for various of the possible locationsassetName
- Asset's filenamepublic static boolean retain(AssetsImpl.Locations locs, java.lang.String assetName, java.lang.String contents)
locs
- parameters for various of the possible locationsassetName
- Asset's filenamecontents
- the file contents