public class KanziResourceFile
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
KanziResourceFile.ResourceFile |
| Modifier and Type | Method and Description |
|---|---|
void |
APKCloseFile(KanziResourceFile.ResourceFile file)
Closes the input stream in given ResourceFile and releases associated resources.
|
long |
APKGetFileLength(KanziResourceFile.ResourceFile file)
Returns the total number of bytes of ResourceFile's data.
|
KanziResourceFile.ResourceFile |
APKOpenFile(java.lang.String filename)
Creates a ResourceFile object containing an open InputStream for the given filename
in context set by
setContext(Context). |
long |
APKReadFile(KanziResourceFile.ResourceFile file,
int size)
Reads the specified number of bytes from a given ResourceFile.
|
long |
APKSkipFile(KanziResourceFile.ResourceFile file,
int offset)
Skips over and discards a number bytes of data from ResourceFile's input stream.
|
Context |
getContext()
Returns the context which have been set using
setContext(Context). |
static KanziResourceFile |
getInstance()
Returns an instance of KanziResourceFile.
|
void |
setContext(Context context)
Sets the context of KanziResourceFile.
|
public static KanziResourceFile getInstance()
setContext(Context). Context
defaults to null and APKOpenFile(String) requests will fail until set.public void setContext(Context context)
context - The application's context utilizing KanziResourceFile's services.public Context getContext()
setContext(Context).public KanziResourceFile.ResourceFile APKOpenFile(java.lang.String filename)
setContext(Context).filename - A resource file in APK to be opened.public long APKReadFile(KanziResourceFile.ResourceFile file, int size)
size bytes, if requested size is larger than
the previously allocated size of ResourceFile.file - ResourceFile with open InputStream to read.size - Read buffer size in bytes.public long APKSkipFile(KanziResourceFile.ResourceFile file, int offset)
file - ResourceFile to read.offset - Number of bytes to skip.public long APKGetFileLength(KanziResourceFile.ResourceFile file)
AssetFileDescriptor#UNKNOWN_LENGTH if the asset extends to the end of the file.file - ResourceFile to query.public void APKCloseFile(KanziResourceFile.ResourceFile file)
file - ResourceFile to close.(c) Rightware. All rights reserved.