Another form of persistent storage is resource files. Accessing resource files is very simple, but they are important nevertheless. Resource files can be images, text, or other types of files that are stored in a MIDlet suite JAR.
You can access a resource file as an InputStream by using the getResourceAsStream() method in Class. A typical usage looks like this:
InputStream in = this.getClass().getResourceAsStream("/Robotag-t.png");
Team-Fly |