E:\mob\1\Netconnect\src\NetHellp.java 1 /* 2 * To change ...

weaverchurchΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 5 χρόνια και 5 μέρες)

433 εμφανίσεις

E:
\
mob
\
1
\
Netconnect
\
src
\
NetHellp.java


1 /*


2 * To change this template, choose Tools | Templates


3 * and open the template in the editor.


4 */


5


6 import java.io.IOException;


7 import java.io.InputStream;


8 import java.io.OutputStream;


9 import javax.microedition.io.Connector;


10 import javax.microedition.io.HttpConnection;


11 import javax.microedition.io.file.ConnectionClosedException;


12 import javax.microedition.midlet.*;


13 import javax.microedi
tion.lcdui.*;


14 import javax.microedition.location.Coordinates;


15 import javax.microedition.location.Criteria;


16 import javax.microedition.location.Location;


17 import javax.microedition.location.LocationProvider;


18 import javax.microedition.rms.RecordStore;


19 import javax.microedition.rms.RecordStoreException;


20 import javax.microedition.rms.RecordStoreFullException;


21 import javax.microedition.rms.RecordStoreNotFoundException;


22 import org.netbeans.micro
edition.lcdui.SplashScreen;


23


24 /**


25 * @author pedram


26 */


27 public class NetHellp extends MIDlet implements CommandListener {


28


29 private boolean midletPaused = false;


30


31 //<editor
-
fold defaultstate="collapsed" desc=" Gene
rated Fields ">


32 private List list;


33 private Form form;


34 private StringItem s1;


35 private StringItem s2;


36 private Gauge g1;


37 private Form form1;


38 private StringItem s3;


39 private T
extField t1;


40 private Form form2;


41 private StringItem stringItem;


42 private StringItem s11;


43 private SplashScreen splashScreen;


44 private Command exitCommand;


45 private Command backCommand;


46 private Command screenCommand;


47 private Font font;


48 //</editor
-
fold>


49


50 /**


51 * The NetHellp constructor.


52 */


53 public NetHellp() {


54 }


55 String url="";


56 //<editor
-
fold def
aultstate="collapsed" desc=" Generated Methods ">


57 //</editor
-
fold>


58


59 //<editor
-
fold defaultstate="collapsed" desc=" Generated Method:
initialize ">


60 /**


6
1 * Initilizes the application.


62 * It is called only once when the MIDlet is started. The method is
called before the <code>startMIDlet</code> method.


63 */


64 private void initialize() {


65 // write pre
-
initialize user code here


66


67 // write post
-
initialize user code here


68 }


69 //</editor
-
fold>


70


71 //<editor
-
fold
defaultstate="collapsed" desc=" Generated Method:
startMIDlet ">


72 /**


73 * Performs an action assigned to the Mobile Device
-

MIDlet Started
point.


74 */


75 public void startMIDlet() {



76 // write pre
-
action user code here


77 // kl();


78 switchDisplayable(null, getSplashScreen());


79 // write post
-
action user code here


80


81


82 }



83 //</editor
-
fold>


84


85 //<editor
-
fold defaultstate="collapsed" desc=" Generated Method:
resumeMIDlet ">


86 /**


87 * Performs an action assigned to the Mobile De
vice
-

MIDlet Resumed
point.


88 */


89 public void resumeMIDlet() {


90 // write pre
-
action user code here


91


92 // write post
-
action user code here


93 }


94 //</editor
-
fold>


95


96 //<editor
-
fold defaultstate="collapsed" desc=" Generated Method:
switchDisplayable ">


97 /**


98 * Switches a curr
ent displayable in a display. The
<code>display</code> instance is taken from <code>getDisplay</code> method.
This method is used by all actions in the design for switching displayable.


99 * @param alert the Alert which is temporarily set to the display;

if
<code>null</code>, then <code>nextDisplayable</code> is set immediately

100 * @param nextDisplayable the Displayable to be set

101 */

102 public void switchDisplayable(Alert alert, Displayable nextDisplayable)
{


103 // write pre
-
switch user code here

104 Display display = getDisplay();

105 if (alert == null) {

106 display.setCurrent(nextDisplayable);

107 } else {

108 display.s
etCurrent(alert, nextDisplayable);

109 }

110 // write post
-
switch user code here

111 }

112 //</editor
-
fold>

113

114 //<editor
-
fold

defaultstate="collapsed" desc=" Generated Method:
commandAction for Displayables ">

115 /**

116 * Called by a system to indicated that a command has been invoked on a
particular displayable.

117 * @param
command the Command that was invoked

118 * @param displayable the Displayable where the command was invoked

119 */

120 public void commandAction(Command command, Displayable displayable) {

121 // wri
te pre
-
action user code here

122 if (displayable == form) {

123 if (command == exitCommand) {

124 // write pre
-
action user code here

125

exitMIDlet();

126 // write post
-
action user code here

127 }

128 } else if (displayable == form1) {

129 if (command == backCommand
) {

130 // write pre
-
action user code here

131 switchDisplayable(null, getList());

132 // write post
-
action user code here

133

} else if (command == screenCommand) {

134 // write pre
-
action user code here

135 ////////
سردآ دورو عبات یناوخارف

136 insert();

137


138 // write post
-
action user code here

139 }

140 } else if (displayable == form2) {

141 if (command == backCommand) {

142

// write pre
-
action user code here

143 switchDisplayable(null, getList());

144 // write post
-
action user code here

145 }

146 }

else if (displayable == list) {

147 if (command == List.SELECT_COMMAND) {

148 // write pre
-
action user code here

149 listAction();

150

// write post
-
action user code here

151 } else if (command == exitCommand) {

152 // write pre
-
action user code here

153 exitMIDlet();


154 // write post
-
action user code here

155 }

156 } else if (displayable == splashScreen) {

157 if (command == SplashScreen.DISMISS_COMMAND) {


158 // write pre
-
action user code here

159 switchDisplayable(null, getForm());

160 // write post
-
action user code here

161 ////////////
ت
سیباتید زا سردا ندناوخ عبا

162 read();

163 ////////////
سا یپ یج عبات یزادنا هار

164 new Thread(new Runnable() {

165

166 public void run() {

167 try {

168 gps2();

169

} catch (Exception e) {

170 }

171 }

172 }).start();

173

174 }

175 }

176

// write post
-
action user code here

177 }

178 //</editor
-
fold>

179

180 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter: list
">

181 /
**

182 * Returns an initiliazed instance of list component.

183 * @return the initialized component instance

184 */

185 public List getList() {

186 if (list == null) {

187 // write pre
-
init user code here

188 list = new List("
\
u0645
\
u0646
\
u0648", Choice.IMPLICIT);

189 list.append("
\
u0645
\
u0634
\
u0627
\
u0647
\
u062F
\
u0647
\
u0646
\
u0642
\
u0634
\
u0647
\
u0645
\
u062D
\
u0644", null);

190
list.append("
\
u0648
\
u0636
\
u0639
\
u06CC
\
u062A
\
u0622
\
u0628
\
u0648
\
u0647
\
u0648
\
u0627", null);

191 list.append("
\
u0648
\
u0636
\
u0639
\
u06CC
\
u062A
\
u0631
\
u0627
\
u0647
\
u0647
\
u0627", null);

192 list.append("
\
u0648
\
u0631
\
u0648
\
u062F
\
u0622
\
u062F
\
u063
1
\
u0633", null);

193 list.addCommand(getExitCommand());

194 list.setCommandListener(this);

195 list.setSelectedFlags(new boolean[] { false, false, false,
false });

196 list.setFont(0, getFont());

197 list.setFont(1,
getFont());

198 list.setFont(2, getFont());

199 list.setFont(3, getFont());

200 // write post
-
init user code here

201 }

202 return list;

203 }

204 //</editor
-
fol
d>

205 String ww="";

206 //<editor
-
fold defaultstate="collapsed" desc=" Generated Method:
listAction ">

207 /**

208 * Performs an action assigned to the selected list element in the list
componen
t.

209 */

210 public void listAction() {

211 // enter pre
-
action user code here

212 String __selectedString =
getList().getString(getList().getSelectedIndex());

213 if

(__selectedString != null) {

214 if
(__selectedString.equals("
\
u0645
\
u0634
\
u0627
\
u0647
\
u062F
\
u0647
\
u0646
\
u0642
\
u0634
\
u0647
\
u0645
\
u062D
\
u0644")) {

215 // write pre
-
action user code here

216

switchDisplayable(null,getForm2());

217 ww="map";

218 www=0;

219 s11.setText("
لاسرا لاح رد

....");

220 send();

221

222 // write post
-
action user co
de here

223 } else if
(__selectedString.equals("
\
u0648
\
u0636
\
u0639
\
u06CC
\
u062A
\
u0622
\
u0628
\
u0648
\
u0647
\
u0648
\
u0627")) {

224 // write pre
-
action user code here

225 switchDisplayable(
null,getForm2());

226

227 // write post
-
action user code here

228 ww="wether";

229 www=0;

230 s11.setText("
لاسرا لاح رد

....");

231 send();

232 }
else if
(__selectedString.equals("
\
u0648
\
u0636
\
u0639
\
u06CC
\
u062A
\
u0631
\
u0627
\
u0647
\
u0647
\
u0627")) {

233 // write pre
-
action user code here

234 switchDisplayable(null,getForm2());

235

ww="trafic";

236 s11.setText("
لاسرا لاح رد

....");

237 www=0;

238 send();

239

240 // write post
-
action user code here

241 } else if (__selectedString.equals("
\
u0648
\
u0631
\
u0648
\
u062F
\
u0622
\
u062F
\
u0631
\
u0633")) {

242 // write pre
-
action user code here

243 switchDisplayable(null, getForm1());


244 // write post
-
action user code here

245 t1.setString(url);

246 }

247 }

248 // enter post
-
action us
er code here

249 }

250 //</editor
-
fold>

251

252 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter: form
">

253 /**

254 * Returns an initiliazed instance of

form component.

255 * @return the initialized component instance

256 */

257 public Form getForm() {

258 if (form == null) {

259 // write pre
-
init user code here

260 form = new Form("
\
u0627
\
u062A
\
u
0635
\
u0627
\
u0644", new Item[] {
getS1(), getG1(), getS2() });

261 form.addCommand(getExitCommand());

262 form.setCommandListener(this);

263 // write post
-
init

user code here

264 }

265 return form;

266 }

267 //</editor
-
fold>

268

269 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter: s1 ">

270 /**

271 *
Returns an initiliazed instance of s1 component.

272 * @return the initialized component instance

273 */

274 public StringItem getS1() {

275 if (s1 == null) {

276 // write pre
-
init user code here

277

s1 = new StringItem("", "
\
u062F
\
u0631
\
u062D
\
u0627
\
u0644
\
u0627
\
u062A
\
u0635
\
u0627
\
u0644
\
u0628
\
u0647
\
u0645
\
u0627
\
u0647
\
u0648
\
u0627
\
u0631
\
u0647
-

\
u0644
\
u0637
\
u0641
\
u0627
\
u062F
\
u0631
\
u0645
\
u06A9
\
u0627
\
u0646
\
u0647
\
u0627
\
u06CC
\
u0628
\
u0627
\
u0632
\
u0628
\
u0627
\
u06CC
\
u0633
\
u062A
\
u06CC
\
u062F
-

\
u0645
\
u0646
\
u062A
\
u0638
\
u0631
\
u0628
\
u0645
\
u0627
\
u0646
\
u06CC
\
u062F..
\
n");

278 s1.setLayout(ImageItem.LAYOUT_RIGHT | Item.LAYOUT_2);

279 s1.setFont(getFont());


280 // write post
-
init user code here

281 }

282 return s1;

283 }

284 //</editor
-
fold>

285

286 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter:

exitCommand ">

287 /**

288 * Returns an initiliazed instance of exitCommand component.

289 * @return the initialized component instance

290 */

291 public Command getExitCommand() {

292 if (exitCommand == null) {

293 // write pre
-
init user code here

294 exitCommand = new Command("Exit", Command.EXIT, 0);

295 // write post
-
init user
code here

296 }

297 return exitCommand;

298 }

299 //</editor
-
fold>

300

301 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter: font
">

302 /**

303 * R
eturns an initiliazed instance of font component.

304 * @return the initialized component instance

305 */

306 public Font getFont() {

307 if (font == null) {

308 // write pre
-
init user code here

309

font = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN,
Font.SIZE_SMALL);

310 // write post
-
init user code here

311 }

312 return font;

313 }

314 //</editor
-
fold>


315

316 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter: g1 ">

317 /**

318 * Returns an initiliazed instance of g1 component.

319 * @return the initialized component instance

320 */

321
public Gauge getG1() {

322 if (g1 == null) {

323 // write pre
-
init user code here

324 g1 = new Gauge("GPS", false, 100, 10);

325 // write post
-
init user

code here

326 }

327 return g1;

328 }

329 //</editor
-
fold>

330

331 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter: s2 ">

332 /**

333 * Returns an
initiliazed instance of s2 component.

334 * @return the initialized component instance

335 */

336 public StringItem getS2() {

337 if (s2 == null) {

338 // write pre
-
init user code here

339 s2 = new

StringItem("", "");

340 s2.setLayout(ImageItem.LAYOUT_CENTER);

341 s2.setFont(getFont());

342 // write post
-
init user code here

343 }

344 return s2;

345 }

346 //</editor
-
fold>

347

348 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter: form1
">

349 /**

350 * Returns an initilia
zed instance of form1 component.

351 * @return the initialized component instance

352 */

353 public Form getForm1() {

354 if (form1 == null) {

355 // write pre
-
init user code here

356 form1 = new F
orm("
\
u0648
\
u0631
\
u0648
\
u062F
\
u0622
\
u062F
\
u0631
\
u0633
\
u062C
\
u062F
\
u06CC
\
u062F", new Item[] { getT1(),
getS3() });

357 form1.addCommand(getBackCommand());

358 form1.addCommand(getScreenCommand());

359

form1.setCommandListener(this);

360 // write post
-
init user code here

361 }

362 return form1;

363 }

364 //</editor
-
fold>

365

366 //<
editor
-
fold defaultstate="collapsed" desc=" Generated Getter: t1 ">

367 /**

368 * Returns an initiliazed instance of t1 component.

369 * @return the initialized component instance

370 */

371 public TextField getT1() {

372 if (t1 == null) {

373 // write pre
-
init user code here

374 t1 = new TextField("
\
u0648
\
u0631
\
u0648
\
u062F
\
u0622
\
u062F
\
u0631
\
u0633", "http://www.mersa.ir/gps/11.php", 100,
TextField.URL);


375 // write post
-
init user code here

376 }

377 return t1;

378 }

379 //</editor
-
fold>

380

381 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter: s3

">

382 /**

383 * Returns an initiliazed instance of s3 component.

384 * @return the initialized component instance

385 */

386 public StringItem getS3() {

387 if (s3 == null) {

388

// write pre
-
init user code here

389 s3 = new StringItem("", "");

390 s3.setLayout(ImageItem.LAYOUT_CENTER | Item.LAYOUT_2);

391 s3.setFont(getFont());

392 // write post
-
init user code here

393 }

394 return s3;

395 }

396 //</editor
-
fold>

397

398 //<editor
-
fold defaultst
ate="collapsed" desc=" Generated Getter:
backCommand ">

399 /**

400 * Returns an initiliazed instance of backCommand component.

401 * @return the initialized component instance

402 */

403 public Command getBackCommand(
) {

404 if (backCommand == null) {

405 // write pre
-
init user code here

406 backCommand = new
Command("
\
u0628
\
u0627
\
u0632
\
u06AF
\
u0634
\
u062A", Command.BACK, 0);

407

// write post
-
init user code here

408 }

409 return backCommand;

410 }

411 //</editor
-
fold>

412

413 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter:
screenCommand ">


414 /**

415 * Returns an initiliazed instance of screenCommand component.

416 * @return the initialized component instance

417 */

418 public Command getScreenCommand() {

419 if (screenCommand == null) {

420 // write pre
-
init user code here

421 screenCommand = new Command("
\
u062B
\
u0628
\
u062A",
Command.SCREEN, 0);

422 // w
rite post
-
init user code here

423 }

424 return screenCommand;

425 }

426 //</editor
-
fold>

427

428 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter: form2
">


429 /**

430 * Returns an initiliazed instance of form2 component.

431 * @return the initialized component instance

432 */

433 public Form getForm2() {

434 if (form2 == null) {

435 // write pre
-
init

user code here

436 form2 = new Form("
\
u062F
\
u0631
\
u062D
\
u0627
\
u0644
\
u062A
\
u0628
\
u0627
\
u062F
\
u0644
\
u0627
\
u0637
\
u0644
\
u0627
\
u0639
\
u0627
\
u062A",
new Item[] { getStringItem(), getS11() });

437 form2.addCo
mmand(getBackCommand());

438 form2.setCommandListener(this);

439 // write post
-
init user code here

440 }

441 return form2;

442 }

443 //</editor
-
fold>


444

445 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter:
stringItem ">

446 /**

447 * Returns an initiliazed instance of stringItem component.

448 * @return the initialized compon
ent instance

449 */

450 public StringItem getStringItem() {

451 if (stringItem == null) {

452 // write pre
-
init user code here

453 stringItem = new StringItem("", "");


454 stringItem.setFont(getFont());

455 // write post
-
init user code here

456 }

457 return stringItem;

458 }

459 //</editor
-
fold>

460

461 //
<editor
-
fold defaultstate="collapsed" desc=" Generated Getter: s11 ">

462 /**

463 * Returns an initiliazed instance of s11 component.

464 * @return the initialized component instance

465 */

466 public StringItem
getS11() {

467 if (s11 == null) {

468 // write pre
-
init user code here

469 s11 = new StringItem("", "
\
u062F
\
u0631
\
u062D
\
u0627
\
u0644
\
u0627
\
u0631
\
u0633
\
u0627
\
u0644...");


470 s11.setLayout(ImageItem.LAYOUT_RIGHT | Item.LAYOUT_2);

471 s11.setFont(getFont());

472 // write post
-
init user code here

473 }

474 return s11;

475 }

4
76 //</editor
-
fold>

477

478 //<editor
-
fold defaultstate="collapsed" desc=" Generated Getter:
splashScreen ">

479 /**

480 * Returns an initiliazed instance of splashScreen component.

481 * @return

the initialized component instance

482 */

483 public SplashScreen getSplashScreen() {

484 if (splashScreen == null) {

485 // write pre
-
init user code here

486 splashScreen = new SplashScreen(getDisplay
());

487 splashScreen.setTitle("splashScreen");

488 splashScreen.setCommandListener(this);

489 splashScreen.setText("");

490 splashScreen.setTimeout(1000);

491 // write post
-
init user code here

492 }

493 return splashScreen;

494 }

495 //</editor
-
fold>

496

497 /**

49
8 * Returns a display instance.

499 * @return the display instance.

500 */

501 public Display getDisplay () {

502 return Display.getDisplay(this);

503 }

504

505 /**

506 * Exits MIDlet.

507 */

508 public voi
d exitMIDlet() {

509 switchDisplayable (null, null);

510 destroyApp(true);

511 notifyDestroyed();

512 }

513

514 /**

515 * Called when MIDlet is started.

516 * Checks whether the MIDlet have been already started
and
initialize/starts or resumes the MIDlet.

517 */

518 public void startApp() {

519 if (midletPaused) {

520 resumeMIDlet ();

521 } else {

522 initialize ();

523 startMIDlet ();

524 }

525

midletPaused = false;

526 }

527

528 /**

529 * Called when MIDlet is paused.

530 */

531 public void pauseApp() {

532 midletPaused = true;

533 }

534

535 /**

536 * Called to signal the MIDlet to terminate.

537 * @param unconditional if true, then the MIDlet has to be
unconditionally terminated and all resources has to be released.

538 */

539 public void destroyApp(boolean unconditional) {

540 }

541 String nb="";

542 public void gps2(){

543 ///////////////
ددع صاصتخا
03

تیعضو هدنهد ناشن هب

544 g1.setValue(30);

545

546 try {

547 Criteria cr= new Criteria();

548 cr.setHorizontalAccuracy(500);

549 LocationProvider lp= LocationProvider.getInstance(cr);

550 switch(lp.getS
tate())

551 {

552 case LocationProvider.AVAILABLE:

553 nb="GPS Swich On";

554 break;

555 case LocationProvider.OUT_OF_SERVICE:

556 nb="GPS is Out Of Service";

557

break;

558 case LocationProvider.TEMPORARILY_UNAVAILABLE:

559 nb="GPS is TEMPORARILY_UNAVAILABLE";

560 break;

561

562 }

563 ///////////
سا یپ یج تیعضو شیامن

564 g1.setLab
el(nb);

565 g1.setValue(50);

566 ///////////////
صاصتخا
0333

تیعقوم نتفای تهج بای تیعقوم هب هیناث

567 Location l = lp.getLocation(2000);

568 ///////////////
تیعقوم تفایرد

569 Coordinates c = l.getQualifiedCoordinates();

570 ////////
تیعقوم دوجو تروص رد

571 if(c != null ) {

572 g1.setValue(100);

573 double lat = c.getLatitude();

574 double lon = c.getLongitude();

575 String arz =Double.toString(lat);

576 String tool = Double.toString(lon);

577 String aw1=arz.substring(0,2);

578 String aw2=arz
.substring(3,8);

579 String al1=tool.substring(0,2);

580 String al2=tool.substring(3,8);

581 /////////
ییایفارغج ضرع و لوط ندرک ادج

582 qa=aw1+"."+aw2;

583 qa2=al1+"."+al2;

584 s2.setText("
تفریذپ ماجنا تیقفوم اب
"+"
\
n"+qa+":"+qa2);

585 //////////
رجا
رمیات عبات یا

586 wai();

587 }

588

589 } catch (Exception e) {

590 }

591

592 }

593 String qa;

594 String qa2;

595 //////////
رمیات عیات
0

هیناث

596 public void wai(){

597 try {

598 Thread.sleep(2000);

599

switchDisplayable(null, getList());

600 } catch (InterruptedException ex) {

601 ex.printStackTrace();

602 }

603 }

604 private RecordStore r;

605 public void insert(){

606 try {

607 //////////
م تفابرد
سکاب سکت رادق

608 String lo=t1.getString();

609 /////////
تیاب هب لیدبت

610 byte[] h=lo.getBytes();

611 url=lo;

612 ////////////
نونک ات هدش جرد یتاعلاطا نونکات عکنیا یسرب

613 if(r.get
NumRecords()>0){

614 ////////
سیباتید رد تاعلاطا تیدپآ

615 r.setRecord(1, h,0, h.length);

616 }else{

617 /////////
سیباتید رد تاعلاطا جرد

618 r.addRecord(h, 0, h.length);

619

}

620 s3.setText("
دیدرگ جرد تیقفوم اب سردآ
");

621 } catch (RecordStoreException ex) {

622 ex.printStackTrace();

623 }

624 }

625 String url2="";

626 public void read(){

627 try {

628 ///////////

روتسا دروکر ندرکزاب

629 r = RecordStore.openRecordStore("oi", true);

630 if(r.getNumRecords()>0){

631 byte[] recData = new byte[5];

632 int len;

633 recData = new byte[r.getRecordSize(1)];

634

len = r.getRecord(1, recData, 0);

635 //////

636 url2= new String(recData, 0, len);

637 }else{

638 /////////////
راب نیلوا یارب سردآ نداد رارق

639 url2="http://www.mersa.ir/gps/11.
php";

640 byte[] kk=url2.getBytes();

641 r.addRecord(kk, 0, kk.length);

642 }

643 } catch (RecordStoreException ex) {

644 ex.printStackTrace();

645 }

646 }

647 int www=0;

648 private
InputStream s;

649 private OutputStream os2;

650 private HttpConnection conn2;

651 String s44="";

652 public void send(){

653 if(www==0){

654 www=1;

655 new Thread(new Runnable()

656 {

657

658

659 public void run()

660 {

661 try{

662 //////////
نشکناک کی ندذک زاب

663 conn2 = (HttpConnection)Connector.open(url2+"?la="+qa+"&lo="+qa2);

664 /////////
لاصتا عون نیعت

665 conn2.setRequestMethod(HttpConnection.GET);

666 ////////
نشکناک میرتسا کی فیرعت

667 s = conn2.openInputStream();

668 /////////////
رورس زا تاعلاطا ندناوخ

669 while(s.read() !=
-
1) {

670 byte[] imgData2 = new byte[s.available()];

671 s.read(imgData2);

672 int im44 = imgData2.length;

673 String s1= n
ew String(imgData2, 0, im44,"utf
-
8");

674 s44=s44+s1;

675 ////////
رورس زا تاعلاطا ندناوخ نایاپ یسررب

676 if(s.read()==
-
1){

677 //////////
هشقن هدهاشم

678 kl();

679 }

680 }

681 } catch (IOException ex) {

682 ex
.printStackTrace();

683 }catch(ConnectionClosedException e){

684 }

685 finally{

686 try{

687 os2.close();

688 }catch(Exception e){}

689 try{

690 conn2.close();

691 }catch(Exception e){}

692 }

693 }

694 }

695 ).start();

696 }

697 }

698 //////////
تسیل شیامن

699 public void hj(){

700 switchDisplayable(null, getList());

701 }

702 ////////////
هشفن زیونک سلاک شیامن

703 public void kl(){

704 switchDisplayable(null, new map(this));

705 }

706 }

707

708