摘要: 计算机类计算机系统结构(30课时)http://www.da-fan-shu.cn/20091022_455/信息管理概论(12课时)http://www.da-fan-shu.cn/20091022_454/音频视频采集与编辑(6课时)http://www.da-fan-shu.cn/20091022_453/网络数据库SQL(12课时)http://www.da-fan-shu.cn/20091022_452/数据库系统概论(19课时)http://www.da-fan-shu.cn/20091022_451/信息科学基础(49课时)http://www.da-fan-shu.cn/200 阅读全文
posted @ 2012-12-08 19:54 虎猫 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 发送者:package UDPChat;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.net.DatagramPacket;import java.net.DatagramSocket;import java.net.InetAddress;import java.net.SocketException;import java.net.UnknownHostException;public class UDPSend { publi... 阅读全文
posted @ 2012-12-08 15:39 虎猫 阅读(531) 评论(0) 推荐(0) 编辑
摘要: 代码展示1 监听线程package TcpChat;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.net.Socket;public class MonitoringMessage extends Thread { private Socket socket; public Socket getSocket() { return socket; } public void setSocket(Sock... 阅读全文
posted @ 2012-12-08 14:34 虎猫 阅读(191) 评论(0) 推荐(0) 编辑
摘要: URLConnection类是一个抽象类,代表程序与URL之间的通行连接,此类的实例可用来写入和读取URL引用的资源。URLConnection允许用于post,get或者其他的http请求方式,将请求数据发送到服务器使用步骤: 1.创建URL类实例 2.通过URL实例的openConnection方法获取到URLConnection的对象 3.通过该对象提供的方法可以设置参数和一般请求属性 阅读全文
posted @ 2012-12-08 12:46 虎猫 阅读(129) 评论(0) 推荐(0) 编辑
摘要: URL 是Uniform Resource Location的缩写(统一资源定位符) 是internet上用来描述资源的字符串javaSE API 中提供了URL类来封装实例:package netTest;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.net.MalformedURLException;import java.net.URL; /** * URL 类构造方法有两种 new URL(String spec)... 阅读全文
posted @ 2012-12-08 12:37 虎猫 阅读(175) 评论(0) 推荐(0) 编辑
摘要: netAddress类在网络API套接字编程中扮演了一个重要角色。参数传递给流套接字类和自寻址套接字类构造器或非构造器方法。InetAddress描述了32位或64位IP地址,要完成这个功能,InetAddress类主要依靠两个支持类Inet4Address 和 Inet6Address,这三个类是继承关系,InetAddrress是父类,Inet4Address 和 Inet6Address是子类。由于InetAddress类只有一个构造函数,而且不能传递参数,所以不能直接创建InetAddress对象,比如下面的做法就是错误的:InetAddress ia = new InetAddres 阅读全文
posted @ 2012-12-08 10:08 虎猫 阅读(805) 评论(0) 推荐(0) 编辑