public abstract class Utils
extends java.lang.Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static android.graphics.Bitmap |
GetBitmapFromAssets(android.content.Context context,
java.lang.String assetPath)
Gets a
Bitmap from your content pack's asset directory at the specified path. |
static Model.MultiPageInfo |
GetMultiPageInfoFromAssets(android.content.Context context,
java.lang.String assetPath)
Gets a
Model.MultiPageInfo object from your content pack's asset directory at the specified path. |
static java.lang.String |
ReadAll(java.io.InputStream inputStream)
Read all text from an
InputStream and return the result as a String. |
@NonNull
public static java.lang.String ReadAll(@NonNull
java.io.InputStream inputStream)
throws java.io.IOException
InputStream and return the result as a String.inputStream - The input data to read.java.io.IOException - If an error occurs while reading the stream.@NonNull public static Model.MultiPageInfo GetMultiPageInfoFromAssets(@NonNull android.content.Context context, @NonNull java.lang.String assetPath) throws java.io.IOException
Model.MultiPageInfo object from your content pack's asset directory at the specified path.context - Context object required to access assets.assetPath - The directory under which the info files are located, relative to your content pack's "assets" directory.Model.MultiPageInfo with one Model.InfoPage per file in the specified directory.java.io.IOException - If there is an error reading the file.@NonNull
public static android.graphics.Bitmap GetBitmapFromAssets(@NonNull
android.content.Context context,
@NonNull
java.lang.String assetPath)
throws java.io.IOException
Bitmap from your content pack's asset directory at the specified path.context - Context object required to access assets.assetPath - The file containing the image, relative to your content pack's "assets" directory.Bitmap containing the image in the specified file.java.io.IOException - If there is an error reading the file.