; throw new IOException(); } }
private DataOutputStream openDataOutputStream(HttpConnection conn) throws IOException { return conn.openDataOutputStream(); }
上一页 [1] [2] [3] [4] 下一页
private void closeConnection(HttpConnection conn, DataInputStream dis, DataOutputStream dos) { if(conn!= null) { try { conn.close(); } catch(IOException e) {} } if(dis!=null) { try { dis.close(); } catch(IOException e) {} } if(dos!=null) { try { dos.close(); } catch(IOException e) {} } }
}
import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Displayable; import javax.microedition.lcdui.Form; import javax.microedition.lcdui.StringItem;
public class DisplayCanvas extends Form implements CommandListener { private UIController uicontroller; private StringItem result; private int index = 0; private boolean first = true; public static Command backCommand = new Command("Back", Command.BACK, 2);
public DisplayCanvas(UIController uicontroller) { super("Result"); this.uicontroller = uicontroller; result = new StringItem("you have input:", null); this.addCommand(backCommand); this.setCommandListener(this);
}
public void init(String message) { if (first) { result.setText(message); index = this.append(result); first = false;
上一页 [1] [2] [3] [4] [5] [6] [7] 下一页
|