javaÀûÓÃSocketÍøÂç´«µÝÎļþ
·þÎñÆ÷¶Ë:
package com.huahua;
import java.io.BufferedOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
public class ServerThread extends Thread {
private Socket socket;
public ServerThread(Socket socket) {
super();
this.socket = socket;
}
public void run(){
try {
while(true){
DataInputStream in = new DataInputStream(socket.getInputStream());
//½ÓÊÕ±£´æµÄ·¾¶
String path = "e:\\" + in.readUTF();
//½ÓÊÕµÄÎļþ³¤¶È
long length = in.readLong();
//±£´æÎļþ
DataOutputStream out = new DataOutputStream(new BufferedOutputStream(
new FileOutputStream(path)));
byte[] buf = new byte[1024];
int len = 0;
while((len=in.read(buf))!=-1){
out.write(buf,0,buf.length);
}
out.flush();
out.close();
in.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
public static void main(String[] args){
try {
ServerSocket serverSocket = new ServerSocket(9999);
while(true){
new ServerThread(serverSocket.accept()).start();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
¿Í»§¶Ë:
package com.huahua;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.Socket;
public class Client{
public static void main(String[] args){
FileInputStream fin = null;
DataOutputStream out = null;
try {
Socket socket = new Socket("127.0.0.1",9999);
File file = new File("f:\\ÕÅ»ÝÃà - ²Êºç.wma");
out = new DataOutputStream(socket.getOutputStream());
//´«ËÍÎļþÃû³Æ
out.writeUTF(file.getName());
out.flush();
//´«ËÍÎļþ³¤¶È
out.writeLong(file.length());
out.flush();
//´«ËÍÎļþ
fin = new FileIn
Ïà¹ØÎĵµ£º
¼ÇµÃÔÚcsdnµÄij¸öÌû×ÓÖÐÌáµ½¼ÆËã½×³ËµÄÌÖÂÛ£¬µ±Ê±ÓкܶàÈ˶¼Ìá³öÁË×Ô¼ºµÄËã·¨£¬Ã¿¸öÈ˶¼ÏëµÄºÜÖÜÈ«¡£
ÕâÁ½ÌìÕýºÃ×Ô¼º¿´µ½ÁËÏà¹ØµÄÎÄÕ£¬ÄÇô×ܽáÕûÀíһϣ¬ÒÔ¹©´ó¼Ò²Î¿¼£¬Ò²ÎªÁË×Ô¼ºµÄ֪ʶ×ܽᡣ
ÔÚÊýѧÖУ¬Ö»ÓзǸºÕûÊý²ÅÓн׳ËÔËË㣬Òâ˼¾ÍÊÇ˵¸¡µãÊý¡¢¸ºÕûÊý¶¼²»ÄܽøÐмÆË㣬ÄÇôÎÒÃÇÔÚ¿¼ÂǼÆËãʱ£¬Ð¡ÓÚ0µÄÊý×ÖÎÒÃÇÊDz ......
Java enum ö¾ÙÀàÐÍ
ö¾ÙÀàÐÍÊÇÒ»¸ö³£Á¿¼¯ºÏµÄÊý¾ÝÀàÐÍ¡£
ÒòΪ¶¼Êdz£Á¿£¬ËùÒÔÒ»¸öö¾ÙÀàÐÍÖеÄ×Ö¶ÎÃû¶¼Òª´óд¡£
ÔÚJAVAÖУ¬Ã¶¾ÙÀàÐ͵Ķ¨ÒåÊÇͨ¹ý“enum“¹Ø¼ü×Ö½øÐеġ£ÀýÈçÄãÒª¶¨Òå
Ò»¸ö±íʾһ¸öÐÇÆÚµÄÿһÌìµÄö¾ÙÀàÐÍ£º
public enum Day {
SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY ......
1¡¢Óï·¨£º±ØÐë±È½ÏÊìϤ£¬ÔÚд´úÂëµÄʱºòIDEµÄ±à¼Æ÷¶ÔijһÐб¨´íÓ¦¸ÃÄܹ»¸ù¾Ý±¨´íÐÅÏ¢ÖªµÀÊÇʲôÑùµÄÓï·¨´íÎó²¢ÇÒÖªµÀÈκÎÐÞÕý¡£
2¡¢ÃüÁ±ØÐëÊìϤJDK´øµÄһЩ³£ÓÃÃüÁî¼°Æä³£ÓÃÑ¡ÏÃüÁîÖÁÉÙÐèÒªÊìϤ£ºappletviewer¡¢ HtmlConverter¡¢jar¡¢ java¡¢javac¡¢javadoc¡¢javap¡¢javaw¡¢native2ascii¡¢serialver£¬Èç¹ûÕâЩÃüÁ ......
ÔÚFirefox 3.6ÖУ¬µ±½¹µãÔÚflash»òÕßjava applet¶ÔÏóÉÏʱ£¬»á³öÏÖÒ»¸ö»·ÈƶÔÏóµÄÐéÏß¿ò£¬µ±½«flashÓëjava applet¶ÔÏóµÄ´óСÉè³É100%ʱ£¬µã»÷¶ÔÏóºóÒ³Ãæ»á³öÏÖ¹ö¶¯Ìõ£¬Ó°ÏìÏÔʾЧ¹û£¬½â¾öµÄ·½·¨ÊÇʹÓÃÈçϵÄcss¶¨Ò壺
:focus {
outline: 0;
}
ÕâÑùÔÚ¸÷¸ö²»Í¬µÄä¯ÀÀÆ÷ÖÐÏÔʾµÄЧ¹û¶¼Äܱ£³ÖÒ»Ö¡£ ......
MDAC¡¢DAO¡¢ADO¡¢OLE DB¡¢ODBCÊÇʲô¹Øϵ
MDAC£¨Microsoft Data Access Components£©ÊÇ΢ÈíÊý¾Ý¿â·ÃÎÊ×é¼þ£¬NetpiseºÍÐí¶àÀûÓÃÊý¾Ý¿âµÄÈí¼þ¶¼ÐèÒª²Ù×÷ϵͳ°²×°MDAC¡£ºÜ¶àÓû§µÄ²Ù×÷ϵͳÖÐÒѾ´æÔÚÁËMDAC£¬ÓÐЩÊDzÙ×÷ϵͳÄÚÖõġ¢ÓÐЩÊÇÆäËüÓ¦ÓóÌÐò°²×°µÄ¡£
ÔÚ MDAC ÖÐÓÐÈýÖÖÖ÷Òª¼¼Êõ£º
¡¡¡¡£¨1£©ActiveX Êý¾Ý¶ÔÏó (ADO) ......