|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.app.Resource
public class Resource
You can obtain a resource by using ResourceDatabase.getResource(int, int).
Most commonly, you will use other methods for using resources, such
as ResourceDatabase.getAlert(int). You might access resources
directly if you are using a custom resource type.
| Method Summary | |
|---|---|
int |
getByte(int offset)
Read a single byte from a specified offset into the resource. |
void |
getBytes(byte[] dest,
int offset,
int count)
Copy some number of bytes from a specified offset into the resource into the provided byte array. |
int |
getID()
Obtain the ID of this resource |
InputStream |
getInputStream()
Return an input stream corresponding to the data for this resource. |
int |
getInt(int offset)
Read a little-endian integer from a specified offset into the resource. |
int |
getShort(int offset)
Read a little-endian short from a specified offset into the resource. |
int |
getSize()
Obtain the length of the data contained by this resource. |
int |
getType()
Obtain the type code of this resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public int getType()
This can be one of ResourceDatabase.RSRC_STRING,
ResourceDatabase.RSRC_BITMAP, etc.
public int getID()
public int getSize()
public int getByte(int offset)
IndexOutOfBoundsException - if the offset is out of rangepublic int getShort(int offset)
IndexOutOfBoundsException - if the offset is out of rangepublic int getInt(int offset)
IndexOutOfBoundsException - if the offset is out of range
public void getBytes(byte[] dest,
int offset,
int count)
IndexOutOfBoundsException - if the offset is out of rangepublic InputStream getInputStream()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||