第4回:実機に載せよう(ダウンサイズ)
001:import javax.microedition.midlet.*;
002:import javax.microedition.io.*;
003:import java.io.*;
004:
005:/**
006: * タイトル:
007: * 説明:
008: * 著作権: Copyright (c) 2003
009: * 会社名:
010: * @author 未入力
011: * @version 1.0
012: */
013:
014:public class Temp {
015: private void connect(){
016: HttpConnection http = null;
017: DataInputStream input = null;
018: int result;
019:
020: String temp = "http://www.s-cradle.com/";
021:
022: try {
023: http = (HttpConnection)Connector.open(temp);
024: input = http.openDataInputStream();
025: result = input.readInt();
026: } catch (IOException ioe) {
027: }
028:
029: try {
030: if (input != null) {
031: input.close();
032: }
033: if (http != null) {
034: http.close();
035: }
036: } catch (IOException ioe) {
037: }
038: }
039:}