Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

FlexÖÐXMLSocketÓëJavaÖÐSocketͨÐÅ

FlexÖÐXMLSocketÓëJavaÖÐSocketͨÐÅ£¬Óöµ½µÄÎÊÌâÊÇ£¬JavaÖеÄsocketÄܹ»½ÓÊܵ½XMLSocket´«ÊäµÄÊý¾Ý£¬µ«ÊÇFlex²¢²»ÄܽÓÊܵ½´ÓJava·þÎñÆ÷´«ÊäµÄÊý¾Ý£¬´ÓÍøÉÏËÑÁ˺öà×ÊÁÏ£¬ÖÕÓÚÕÒµ½ÁËÔ­Òò£¬Ô­À´XMLSocket ½ÓÊÕµ½·þÎñ¶ËÏ·¢µÄÊý¾Ýʱ£¬½«Á¬Ðø·ÅÓÚ½ÓÊÕ»º³åÇø£¬Ö±µ½½ÓÊÕµ½ "\0" ×Ö½Ú£¨×Ö½ÚÄÚÈÝΪ ASCII Öµ 0£©£¬²ÅÈÏΪ½ÓÊÕÍê³É£¬²¢µ÷ÓÃÏàÓ¦µÄ onData »ò onXML ʼþ£¬Òò´Ë£¬·þÎñ¶ËÈôÓà Java ±àд£¬²¢Ê¹Óñê×¼µÄ String Àà×壬ÔòÔÚ·¢ËÍÊý¾Ý½áβӦÊÖ¶¯¼ÓÉÏ "\0"£¬Í¬Ñù£¬µ±XMLSocket·¢ËÍÊý¾Ýʱ£¬Ò²»áÔÚÊý¾ÝµÄ½áβ×Ô¶¯¼ÓÉÏ"\0"¡£
ÎÒÏÖÔÚ½«ÎÒ×öµÄÒ»¸ö¼òµ¥µÄXMLSocketͨÐŵÄÀý×ÓÌù³öÀ´¸ú´ó¼Ò¹²Ïíһϣ¬Èç¹ûÓÐʲô²»×ãµÄµØ·½£¬»¹Íû´ó¼ÒÅúÆÀÖ¸³ö£¬±Ï¾¹ÎÒÒ²ÊÇflex³õѧÕߣ¬ºÇºÇ£¡
JavaÓ¦ÓóÌÐò´úÂ룺
 public class XMLServerSocket {
private ServerSocket serverSocket;
private Socket socketin;
private BufferedReader br;
private PrintStream ps;
public static void main(String[] args) {
new XMLServerSocket();
}
private XMLServerSocket() {
try {
serverSocket = new ServerSocket(8800);
socketin = serverSocket.accept();
br = new BufferedReader(new InputStreamReader(socketin
.getInputStream()));
ps = new PrintStream(socketin.getOutputStream());
ps.println("Input EXIT for end\0");
ps.flush();
out("Input EXIT for end");
boolean done = false;
while (!done) {
String str = br.readLine();
if (str == null || (str.length() == 1 && str.charAt(0) == '\0')) {
done = true;
} else {
char first = str.charAt(0);
char tail = str.charAt(str.length() - 1);
if (first == '\0') {
str = str.substring(1);
}
if (tail == '\0') {
str = str.substring(0, str.length() - 2);
}
out(str);
ps.println(str + "\0");
if (str.trim().equals("EXIT")) {
done = true;
br.close();
}
}
}
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
private void out(String str) {
System.out.println(str);
}
}
Flex³ÌÐò´úÂ룺
<?xml version="1.0" encoding="utf-8"?>
<mx:Appli


Ïà¹ØÎĵµ£º

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

javaÖеÄString³Ø

 
 
ÔÚ½øÈëÎÒÃǽñÌìµÄ»°ÌâÇ°£¬ÏÈÀ´¿´¿´ÏÂÃæÕâ¶Î´úÂ룬ÄãÖªµÀËüµÄ½á¹ûÂð£¿
³ÌÐò´úÂë
public class StringTest1{
  public static void main(String[] args) {
     String str1 = "abc";
     String str2 = "abc";
   &nbs ......

Java EEÓ¦Óÿª·¢

¿Î³ÌÃèÊö£º
       ±¾¿Î³Ì´ÓJavaÓïÑÔ¿ªÊ¼£¬ÉîÈëdz³ö£¬Ñ­Ðò½¥½ø£¬ÀíÂÛÓëʵ¼ùÏà½áºÏ£¬Ã¿¸ö֪ʶµã£¬Ã¿¸ö½×¶Î¶¼ÅäÓÐÓëʵ¼ÊÓ¦ÓýӽüµÄʵսÁ·Ï°£¬×îÖÕÄ¿±êΪϵͳÕÆÎÕÕû¸öJavaÌåϵ£¬Äܹ»ÊìÁ·Ê¹ÓÃ×îÁ÷ÐУ¬×îÈÈÃŵÄJava EEÏà¹Ø¼¼Êõ¼°Æ俪·¢¹¤¾ß¿ª·¢ÆóÒµ¼¶Ó¦Óá£
 
Ô¤±¸ÖªÊ¶£º
l       ......

tomcat×Ô¶¯¼ÓÔØÐ޸ĺóµÄjavaÀà

ʹÓõ÷ÊÔģʽ¼´¿É¡£
½øTOMCATµÄmanager¿ØÖÆ̨£¬¿ÉÒÔ¶ÔÖ¸¶¨µÄÐéÄâĿ¼½øÐпØÖÆ£¨¼ÓÔØ£¬ÖØÔØ£¬Ð¶ÔØ£©£¬±ÈÖØÆô¿ìµÄ¶à£¬ÔÚTOMCATµÄĬÈÏÊ×Ò³ÉÏÓÐÁ´½Ó¡£
============================================================================================
ÎÒÃÇÔÚ¿ª·¢µÄ¹ý³Ì¾­³£ÐèÒªµ÷ÊÔ£¬Ò²³£³£ÐèÒªÐÞ¸ÄʹÓõÄÀàºÍservlet£¬Èç¹û ......

Java»æͼ

ÏÂÃæÊÇÎÒÈÏΪÕýÈ·µÄ×ö·¨£¨½áºÏ×Ô¼ºµÄ¾­ÑéдµÄ£¬Èç¹û²»ÕýÈ·£¬Çë´ó¼ÒÖ¸Õý£©£º
ÎҵĻæͼ¿Ø¼þÊÇJPanel£¬
³öÏÖ¹ö¶¯ÌõµÄÇ°Ìᣬ±ØÐëÈûæͼ¿Ø¼þ·ÅÔÚJScrollPaneÉÏ£¬
¶ÔÓÚJScrollPaneµÄLayout£¬Ã»ÓÐÌØÊâÒªÇó£¬ÏÂÃæÕâÑù¼´¿É£º
jScrollPane1.setViewportView(jPanel1);
È»ºó£¬ÁíÍâά³ÖÒ»¸öBufferedImage£¨¼ÙÉè½Ðimage1£©£¬¸÷ÖÖÍ¼Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ