package lab.sodino.img; import java.io.IOException; import java.io.InputStream; import javax.microedition.io.Connector; import javax.microedition.io.file.FileConnection; import javax.microedition.midlet.MIDlet; import javax.microedition.midlet.MIDletStateChangeException; /** @author sodino */ public class ImgType extends MIDlet { public ImgType() { } protected void destroyApp(boolean arg0) throws MIDletStateChangeException { } protected void pauseApp() { } protected void startApp() throws MIDletStateChangeException { String prefix = "file:///root1/"; // testFile(prefix + "logo_cn.gif"); // testFile(prefix + "04.jpg"); testFile(prefix + "img.png"); } public void testFile(String url) { try { int length = 10; FileConnection fc = (FileConnection) Connector.open(url); InputStream is = fc.openInputStream(); byte[] data = new byte[l