锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产亚洲精品中文字幕,亚洲综合电影,国产精品免费不http://www.aygfsteel.com/lukewange-hit1983/category/33801.htmlpresentzh-cnThu, 13 Nov 2008 01:40:31 GMTThu, 13 Nov 2008 01:40:31 GMT60浣嶈繍綆?/title><link>http://www.aygfsteel.com/lukewange-hit1983/archive/2008/11/12/240082.html</link><dc:creator>LukeW</dc:creator><author>LukeW</author><pubDate>Wed, 12 Nov 2008 05:53:00 GMT</pubDate><guid>http://www.aygfsteel.com/lukewange-hit1983/archive/2008/11/12/240082.html</guid><wfw:comment>http://www.aygfsteel.com/lukewange-hit1983/comments/240082.html</wfw:comment><comments>http://www.aygfsteel.com/lukewange-hit1983/archive/2008/11/12/240082.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/lukewange-hit1983/comments/commentRss/240082.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/lukewange-hit1983/services/trackbacks/240082.html</trackback:ping><description><![CDATA[<strong>C涓殑浣嶈繍綆?/strong><br /> 鑳藉榪愮敤鍒頒換浣曟暣褰㈢殑鏁版嵁綾誨瀷涓?鍖呮嫭char, int), 鏃犺鏈夋病鏈塻hort, long, unsigned榪欐牱鐨勯檺瀹氳瘝.<br /> <br /> <br /> 浣嶈繍綆楃殑搴旂敤<br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> 浜ゆ崲鎸囬拡鍙橀噺x,y鎵鎸囧悜鐨勫瓨鍌ㄤ綅緗瀛樻斁鐨勫?br /> </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> 浼樺娍鏄笉闇瑕佺涓変釜浣嶇疆鏉ヤ復鏃跺瓨鍌ㄥ彟涓涓?br /> </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> 浣嗘槸榪欎釜鏂規硶騫舵病鏈夋槑鏄劇殑鎬ц兘浼樺娍,鍙槸涓涓櫤鍔涗笂鐨勬秷閬?/span><span style="color: rgb(0, 128, 0);"><br /> </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> inplace_swap(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">x, </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">y)<br /> {<br />  </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">^</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">y;<br />  </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">^</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">y;<br />  </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">^</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">y;<br /> }<br /> </span></div> <br /> <strong>浣嶈繍綆楀父瑙佺敤娉?</strong><br /> 瀹炵幇鎺╃爜榪愮畻<br /> <br /> <br /> <br /> -----------------------------------<br /> <strong>Java涓殑浣嶈繍綆?/strong><br /> <br /> <br /> <img src ="http://www.aygfsteel.com/lukewange-hit1983/aggbug/240082.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/lukewange-hit1983/" target="_blank">LukeW</a> 2008-11-12 13:53 <a href="http://www.aygfsteel.com/lukewange-hit1983/archive/2008/11/12/240082.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>j2me 鑱旂綉鎶鏈垎鏋愭葷粨http://www.aygfsteel.com/lukewange-hit1983/archive/2008/11/04/238629.htmlLukeWLukeWTue, 04 Nov 2008 08:22:00 GMThttp://www.aygfsteel.com/lukewange-hit1983/archive/2008/11/04/238629.htmlhttp://www.aygfsteel.com/lukewange-hit1983/comments/238629.htmlhttp://www.aygfsteel.com/lukewange-hit1983/archive/2008/11/04/238629.html#Feedback0http://www.aygfsteel.com/lukewange-hit1983/comments/commentRss/238629.htmlhttp://www.aygfsteel.com/lukewange-hit1983/services/trackbacks/238629.html鍩烘湰鐐?

Generic Connections

In the CLDC Generic Connection framework, all connections are created using the open static method from the Connector class. If successful, this method returns an object that implements one of the generic connection interfaces. Figure 1 shows how these interfaces form an is-a hierarchy. The Connection interface is the base interface such that StreamConnectionNotifier is a Connection and InputConnection is a Connection too.

fig1.gif
Figure 1: Connection interface hierarchy
  • The Connection interface is the most basic connection type. It can only be opened and closed.
  • The InputConnection interface represents a device from which data can be read. Its openInputStream method returns an input stream for the connection.
  • The OuputConnection interface represents a device to which data can be written. Its openOutputStream method returns an output stream for the connection.
  • The StreamConnection interface combines the input and output connections.
  • The ContentConnection is a subinterface of StreamConnection. It provides access to some of the basic meta data information provided by HTTP connections.
  • The StreamConnectionNotified waits for a connection to be established. It returns a StreamConnection on which a communication link has ben established.
  • The DatagramConnection represents a datagram endpoint.

The open method of the Connector class has the following syntax, where the String parameter has the format "protocol:address;parameters".

Connector.open(String);

Here are a few examples:

HTTP Connection

Connector.open("http://java.sun.com/developer");

Datagram Connection

Connector.open("datagram://address:port#");

Communicate with a Port

Connector.open("comm:0;baudrate=9600');

Open Files

Connector.open("file:/myFile.txt");


The HttpConnection Interface:

The HTTP protocol is a request-response application protocol in which the parameters of the request must be set before the request is sent. The connection could be in one of the three following states:
  • Setup: No connection yet
  • Connected: Connection has been made, the request has been sent, and some response is expected
  • Closed: Connection is closed

In the setup state the following methods can be invoked:

  • setRequestMethod
  • setRequestProperty

For example, suppose you have this connection:

HttpConnection c = (HttpConnection)
Connector.open(
"http://java.sun.com/developer");

Then, you can set the request method to be of type POST as follows:

c.setRequestMethod(HttpConnection.POST);

And likewise, you can set some of the HTTP properties. For example, you can set the User-Agent as follows:

c.setRequestProperty("User-Agent","Profile/MIDP-1.0 Configuration/CLDC-1.0");

If there is a method that requires data to be sent or received from the server, there is a state transition from Setup to Connected. Examples of methods that cause the transition include:

openInputStream
openOutputStream
openDataInputStream
openDataOutputStream
getLength
getType
getDate
getExpiration

And while the connection is open, some of these methods that may be invoked:

getURL
getProtocol
getHost
getPort


------------------------------------------------------------
瑕佹敞鎰忕殑闂:
寮鍙戜腑閬囧埌涓緢澶寸柤鐨勯棶棰? 涓庢湇鍔″櫒閫氫俊write()鏁版嵁鏃舵姤java.io.IOException: Couldn't write to socket.
浣嗘槸鏈嶅姟鍣ㄦ姄涓嶅埌浠諱綍鍖? 涓寮濮嬫鐤戞槸榪炲緩绔嬭繛鎺ュ嚭鐨勯棶棰? 瀹為檯涓婃湇鍔″櫒鎶撲笉鍒板寘涔熸湁鍙兘鏄祦鍦ㄦ病鏈塩lose鐨勬椂鍊欏氨宸茬粡鎶ラ敊浜?
濡?
conn.open("url");
out = conn.openDataOutputStream();//姝ゆ椂灝嗚繘琛屼笌鏈嶅姟鍣ㄧ殑涓夋鎻℃墜;
                                  //浣嗘槸濡傛灉鍦╫ut.close()涔嬪墠鍑虹幇寮傚父鏈嶅姟鍣ㄦ槸鎶撲笉鍒頒換浣曞寘鐨?br /> out.write(byte[] bb);

鍏充簬榪欎釜鐨勮В閲婂簲璇ユ槸嫻佺殑緙撳啿鏈哄埗.
鎵浠ユ紜殑鍐欐硶搴旇鏄崟鎹夊埌寮傚父涔嬪悗鍦╟atch鍧椾腑鎶婃祦close鎺?strong>.
鏈嶅姟鍣ㄧ寮鍙戜漢鍛樹竴鑸細璇存敹涓嶅埌鍖呮墍浠ヨ繛鎺ユ湁闂,浼氭妸璐d換鎺ㄧ粰瀹㈡埛绔?鎶撲綇榪欎釜璇佹嵁鍦ㄨ窡鏈嶅姟鍣ㄧ鐨勫悓浜嬫壇鐨椂灝嗗浜庢湁鍒╃殑浣嶇疆,鍢庡槑.
榪樻湁灝辨槸瑕佸鍋氬皬瀹為獙, 娉ㄦ剰浠g爜瑕佽鑼冧弗鏍?

鍙戠幇鐨勫嚑涓棶棰?

1. java.io.IOException: Couldn't write to socket

2. java.io.IOException: Couldn't read from socket

CMNET鑱旂綉鏂規:

CMWAP鑱旂綉鏂規:

縐誨姩璧勮垂欏電殑澶勭悊:

涓涓氱敤鐨凥TTP榪炴帴灝佽:



LukeW 2008-11-04 16:22 鍙戣〃璇勮
]]>
j2me鑾峰彇緋葷粺淇℃伅http://www.aygfsteel.com/lukewange-hit1983/archive/2008/08/28/225341.htmlLukeWLukeWThu, 28 Aug 2008 08:43:00 GMThttp://www.aygfsteel.com/lukewange-hit1983/archive/2008/08/28/225341.htmlhttp://www.aygfsteel.com/lukewange-hit1983/comments/225341.htmlhttp://www.aygfsteel.com/lukewange-hit1983/archive/2008/08/28/225341.html#Feedback0http://www.aygfsteel.com/lukewange-hit1983/comments/commentRss/225341.htmlhttp://www.aygfsteel.com/lukewange-hit1983/services/trackbacks/225341.html琛?   CLDC銆丮IDP鍜孞TWI灞炴?/div>
灞炴у悕縐?/div>
灞炴т綔鐢?/div>
microedition.profiles
浠h〃鎵嬫満鏀寔鐨凪IDP鐗堟湰錛岃繑鍥炴牸寮忓間負“MIDP-1.0”鎴?#8220;MIDP-2.0”
microedition.configuration
浠h〃鎵嬫満鏀寔鐨凜LDC鐗堟湰錛岃繑鍥炴牸寮忓間負“CLDC-1.0”鎴?#8220;CLDC-2.0”
microedition.locale
浠h〃鎵嬫満鎵鍦ㄧ殑鍥藉鎴栧湴鍖猴紝榪斿洖鍊兼牸寮忎負“en-US”
microedition.platform
浠h〃鎵嬫満鐨勫搧鐗屽拰鍨嬪彿錛孨okia鎵嬫満鐨勮繑鍥炲兼牸寮忎負“Nokia6310i/4.42”
microedition.encoding
浠h〃鎵嬫満榛樿鐨勫瓧絎﹂泦鍚嶇О錛岃繑鍥炲兼牸寮忎負“ISO-8859-1”
microedition.commports
浠h〃鎵嬫満鍙互浣跨敤鐨勪覆鍙e垪琛紝榪斿洖鍊間腑鍚勪釜涓插彛涔嬮棿浣跨敤閫楀彿鍒嗛殧
microedition.hostname
MIDP2.0瀹氫箟錛屼唬琛ㄦ湰鍦頒富鏈哄悕縐幫紝闇瑕佹墜鏈烘敮鎸併?/div>
microedition.jtwi.version
浠h〃鎵嬫満鏀寔鐨凧TWI鐗堟湰錛屽煎繀欏繪槸“1.0”
 琛? 鍙夊寘灞炴?/div>
灞炴у悕縐?/div>
灞炴т綔鐢?/div>
microedition.media.version
浠h〃鎵嬫満鏀寔鐨凪MAPI鐗堟湰錛屽鏋滀笉鏀寔鍒欒繑鍥瀗ull
microedition.pim.version
浠h〃鎵嬫満鏀寔鐨凱IM API鐗堟湰錛屽鏋滀笉鏀寔鍒欒繑鍥瀗ull
microedition.m3g.version
浠h〃鎵嬫満鏀寔鐨凪3G API鐗堟湰錛屽鏋滀笉鏀寔鍒欒繑鍥瀗ull
microedition.location.version
浠h〃鎵嬫満鏀寔鐨凩ocation API鐗堟湰錛屽鏋滀笉鏀寔鍒欒繑鍥瀗ull
Bluetooth.api.version
浠h〃鎵嬫満鏀寔鐨凚T API鐗堟湰錛屽鏋滀笉鏀寔鍒欒繑鍥瀗ull
microedition.io.file.
FileConnection.version
浠h〃鎵嬫満鏀寔鐨凢C API鐗堟湰錛屽鏋滀笉鏀寔鍒欒繑鍥瀗ull
microedition.global.version
浠h〃鎵嬫満鏀寔鐨凪obile Internationalization API(JSR-238)鐗堟湰錛屽鏋滀笉鏀寔鍒欒繑鍥瀗ull
microedition.chapi.version
浠h〃鎵嬫満鏀寔鐨凜H(Content Handler) API(JSR211)鐗堟湰錛屽鏋滀笉鏀寔鍒欒繑鍥瀗ull
microedition.sip.version
浠h〃鎵嬫満鏀寔鐨凷IP API鐗堟湰錛屽鏋滀笉鏀寔鍒欒繑鍥瀗ull
 琛? MMAPI灞炴?/div>
灞炴у悕縐?/div>
灞炴т綔鐢?/div>
supports.mixing
浠h〃鎵嬫満鏄惁鏀寔娣烽煶(鍚屾椂鎾斁澶氫釜Player)錛岃繑鍥炲間負“true”鎴?#8220;false”
supports.audio.capture
浠h〃鎵嬫満鏄惁鏀寔澹伴煶鎹曡幏(褰曢煶)錛岃繑鍥炲間負“true”鎴?#8220;false”
supports.video.capture
浠h〃鎵嬫満鏄惁鏀寔瑙嗛鎹曡幏(褰曞儚)錛岃繑鍥炲間負“true”鎴?#8220;false”
supports.recording
浠h〃鎵嬫満鏄惁鏀寔璁板綍(record)錛岃繑鍥炲間負“true”鎴?#8220;false”
audio.encodings
浠h〃鎵嬫満鏀寔鐨勫0闊蟲牸寮忥紝榪斿洖鍊兼牸寮忎負“encoding=audio/wav”錛屽涓牸寮忎箣闂翠嬌鐢ㄨ嚦灝戜竴涓┖鏍艱繘琛岄棿闅?/div>
video.encodings
浠h〃鎵嬫満鏀寔鐨勮棰戞牸寮忥紝榪斿洖鍊兼牸寮忎負“encoding=video/3gpp”錛屽涓牸寮忎箣闂翠嬌鐢ㄨ嚦灝戜竴涓┖鏍艱繘琛岄棿闅?/div>
video.snapshot.encodings
浠h〃鎵嬫満浣跨敤getSnapshot鏂規硶鑾峰緱鐨勮棰戝揩鐓ф牸寮忥紝榪斿洖鍊兼牸寮忎負“encoding=png”錛屽涓牸寮忎箣闂翠嬌鐢ㄨ嚦灝戜竴涓┖鏍艱繘琛岄棿闅?/div>
streamable.contents
浠h〃鎵嬫満鏀寔鐨勬祦濯掍綋鏍煎紡錛岃繑鍥瀗ull浠h〃涓嶆敮鎸?/div>
琛? Wireless Messaging API灞炴?/div>
灞炴у悕縐?/div>
灞炴т綔鐢?/div>
wireless.messaging.sms.smsc
浠h〃鎵嬫満鍙戦佺煭淇℃椂鐨勭煭淇℃湇鍔′腑蹇冨彿鐮?/div>
琛? FileConnection API
灞炴у悕縐?/div>
灞炴т綔鐢?/div>
fileconn.dir.photos
浠h〃鎵嬫満涓瓨鍌ㄧ収鐗囧拰鍏跺畠鍥劇墖鐨勭洰褰曪紝渚嬪“file:///c:/My files/ Images /”
fileconn.dir.videos
浠h〃鎵嬫満涓瓨鍌ㄨ棰戠殑鐩綍錛屼緥濡?#8220;file:///c:/My files/Video clips/”
fileconn.dir.tones
浠h〃鎵嬫満涓瓨鍌ㄥ0闊崇殑鐩綍錛屼緥濡?#8220;file:///c:/My files/Tones/”
fileconn.dir.memorycard
浠h〃鎵嬫満涓瓨鍌ㄥ崱鐨勬牴鐩綍銆備緥濡?#8220;file:///d:/”
fileconn.dir.private
(Nokia S40涓嶆敮鎸? 
浠h〃鎵嬫満涓璏IDlet鐨勭鏈夊伐浣滅洰褰曪紝渚嬪“file:///c:/System/MIDlets/[1015f294]/scratch”
fileconn.dir.photos.name
浠h〃鎵嬫満涓浘鐗囩洰褰曠殑鍚嶇О錛屼緥濡?#8220;Images”
fileconn.dir.videos.name
浠h〃鎵嬫満涓棰戠洰褰曠殑鍚嶇О錛屼緥濡?#8220;Video clips”
fileconn.dir.tones.name
浠h〃鎵嬫満涓0闊崇洰褰曠殑鍚嶇О錛屼緥濡?#8220;Sound clips”
file.separator
浠h〃鎵嬫満涓殑鏂囦歡鍒嗛殧絎︼紝渚嬪“/”
fileconn.dir.memorycard.name
浠h〃鎵嬫満涓瓨鍌ㄥ崱鐨勫悕縐幫紝渚嬪“Memory card”
 浣跨敤榪欎簺灞炴э紝鍙互鑾峰緱鍦ㄧ▼搴忚繍琛岃繃紼嬩腑闇瑕佺殑寰堝鍜岀郴緇熺浉鍏崇殑淇℃伅錛屼篃鍙互浣跨敤琛?涓殑灞炴ф潵鑾峰緱鎵嬫満鏄惁鏀寔瀵瑰簲鐨勫彲閫夊寘絳変俊鎭?br /> 瀹為檯浣跨敤紺轟緥錛歋tring name = System.getProperty(“microedition.platform”);

娉ㄦ剰錛氬鏋滈渶瑕佽幏寰桱VM鎴杍ad鏂囦歡涓殑淇℃伅錛岄渶瑕佷嬌鐢∕IDlet綾諱腑鐨刧etAppProperty鏂規硶錛屽叾灞炴у悕鍒欓渶瑕佹煡闃卝ad鏂囦歡鐨勮瀹氾紝鍜屾湰鏂囨墍榪扮殑灞炴у悕鏃犲叧銆?br />


LukeW 2008-08-28 16:43 鍙戣〃璇勮
]]>eclipse鐪熸満璋冭瘯J2me紼嬪簭http://www.aygfsteel.com/lukewange-hit1983/archive/2008/08/15/222266.htmlLukeWLukeWFri, 15 Aug 2008 07:22:00 GMThttp://www.aygfsteel.com/lukewange-hit1983/archive/2008/08/15/222266.htmlhttp://www.aygfsteel.com/lukewange-hit1983/comments/222266.htmlhttp://www.aygfsteel.com/lukewange-hit1983/archive/2008/08/15/222266.html#Feedback0http://www.aygfsteel.com/lukewange-hit1983/comments/commentRss/222266.htmlhttp://www.aygfsteel.com/lukewange-hit1983/services/trackbacks/222266.html
1. 鐪熸満璋冭瘯鍏跺疄鏄巶鍟哠DK鏍規嵁JAVA鐨勮皟璇旳PI灞傚疄鐜扮殑.

2. 瑕佹敞鎰廕AD鏂囦歡涓瓧孌電殑闀垮害涓嶈榪囬暱, 鍚﹀垯浼氭姤閿? 鏃犳硶璋冭瘯.

3. 鐩告瘮杈? netbeans榪涜鐪熸満璋冭瘯瑕佹柟渚夸竴浜? 褰撶劧eclipse搴旇涔熸病闂(鎳掑緱瀹為獙浜?.).


LukeW 2008-08-15 15:22 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 辛集市| 大余县| 阿尔山市| 抚顺县| 永新县| 辽源市| 洛扎县| 文成县| 洞口县| 宝鸡市| 藁城市| 永登县| 财经| 安化县| 确山县| 郧西县| 洪泽县| 凉城县| 行唐县| 临沧市| 锦屏县| 钟祥市| 瑞安市| 鄱阳县| 保定市| 双桥区| 东台市| 永兴县| 安平县| 德州市| 中卫市| 尤溪县| 汶川县| 邢台市| 禹城市| 宜都市| 新余市| 磐安县| 利津县| 东宁县| 元氏县|