Methods Summary |
---|
public byte[] | getRawResourceData(int resourceID)Get raw binary data for resource id.
int rsize = getResourceLength(resourceID);
if (rsize<0){
throw new ResourceException(ResourceException.RESOURCE_NOT_FOUND,
"Resource not found.");
}
byte[] res = new byte[rsize];
if (rsize != getRawResourceData0(locale_index, resourceID, res, 0, rsize)) {
throw new ResourceException(ResourceException.DATA_ERROR,
"Could not read resource.");
}
return res;
|
private static native int | getRawResourceData0(int locale_index, int resourceID, byte[] res, int offset, int length)Method retrieves resource data for the given ID and locale.
|
public int | getResourceLength(int resourceID)Gives length of the resource in bytes.
return getResourceLength0(locale_index, resourceID);
|
private static native int | getResourceLength0(int locale_index, int resourceID)Method retrieves resource length for the given ID and locale.
|
public java.lang.String | getResourceName()Method returns name of resource file
used by this reader.
return new String("DEVICE");
|
public byte | getResourceType(int resourceID)Get type of resource.
int res_type = getResourceType0(locale_index, resourceID);
if (res_type != -1) {
return (byte)res_type;
}
throw new ResourceException(ResourceException.RESOURCE_NOT_FOUND,
"Resource not found.");
|
private static native int | getResourceType0(int locale_index, int resourceID)Method retrieves resource type for the given ID and locale.
|
public boolean | isValidResourceID(int resourceID)Checks if given resource id exits in the bundle.
return isValidResourceID0(locale_index, resourceID);
|
private static native boolean | isValidResourceID0(int locale_index, int resourceID)Determine if a resource with the given ID and locale exists.
|