Java 7网络编程
来源:互联网 发布:mac怎么编辑pdf 编辑:程序博客网 时间:2024/06/05 14:41
网络编程指的是通过网络进行数据操作.既然是网络,就分为客户端和服务器端。常见面试题中有这么一题:C/S 与B/S的区别?
从几个方面:C/S(Client/Server):此类程序安全,但是维护成本高。B/S(Browser/Server):维护成本低,只需要维护服务器端即可,客户端不需要做出任何修改。
此类程序使用公共端口,包括公共协议,所以安全性很差。在Android 开发的时候,如果要考虑安全性使用Socket,如果要给予WEB的开发方便使用我
Interface Description ContentHandlerFactory
Class Description Authenticator
从几个方面:C/S(Client/Server):此类程序安全,但是维护成本高。B/S(Browser/Server):维护成本低,只需要维护服务器端即可,客户端不需要做出任何修改。
此类程序使用公共端口,包括公共协议,所以安全性很差。在Android 开发的时候,如果要考虑安全性使用Socket,如果要给予WEB的开发方便使用我
而对于网络的开发在java中分为两种,TCP(传输控制协议)、UDP(数据报协议)。TCP通过握手协议进行可靠的连接,UDP则是不可靠连接。
Java网络编程的全部操作位于Package java.net(该包:Provides the classes for implementing networking applications.)
所有已知接口
This interface defines a factory for content handlers.
CookiePolicyCookiePolicy implementations decide which cookies should be accepted and which should be rejected.
CookieStoreA CookieStore object represents a storage for cookie.
DatagramSocketImplFactoryThis interface defines a factory for datagram socket implementations.
FileNameMapA simple interface which provides a mechanism to map between a file name and a MIME type string.
ProtocolFamilyRepresents a family of communication protocols.
SocketImplFactoryThis interface defines a factory for socket implementations.
SocketOption<T>A socket option associated with a socket.
SocketOptionsInterface of methods to get/set socket options.
URLStreamHandlerFactoryThis interface defines a factory for
URL
stream protocol handlers.相关类:
The class Authenticator represents an object that knows how to obtain authentication for a network connection.
CacheRequestRepresents channels for storing resources in the ResponseCache.
CacheResponseRepresent channels for retrieving resources from the ResponseCache.
ContentHandlerThe abstract class
CookieHandlerContentHandler
is the superclass of all classes that read an Object
from a URLConnection
.A CookieHandler object provides a callback mechanism to hook up a HTTP state management policy implementation into the HTTP protocol handler.
CookieManagerCookieManager provides a concrete implementation of
DatagramPacketCookieHandler
, which separates the storage of cookies from the policy surrounding accepting and rejecting cookies.This class represents a datagram packet.
DatagramSocketThis class represents a socket for sending and receiving datagram packets.
DatagramSocketImplAbstract datagram and multicast socket implementation base class.
HttpCookieAn HttpCookie object represents an http cookie, which carries state information between server and user agent.
HttpURLConnectionA URLConnection with support for HTTP-specific features.
IDNProvides methods to convert internationalized domain names (IDNs) between a normal Unicode representation and an ASCII Compatible Encoding (ACE) representation.
Inet4AddressThis class represents an Internet Protocol version 4 (IPv4) address.
Inet6AddressThis class represents an Internet Protocol version 6 (IPv6) address.
InetAddressThis class represents an Internet Protocol (IP) address.
InetSocketAddressThis class implements an IP Socket Address (IP address + port number) It can also be a pair (hostname + port number), in which case an attempt will be made to resolve the hostname.
InterfaceAddressThis class represents a Network Interface address.
JarURLConnectionA URL Connection to a Java ARchive (JAR) file or an entry in a JAR file.
MulticastSocketThe multicast datagram socket class is useful for sending and receiving IP multicast packets.
NetPermissionThis class is for various network permissions.
NetworkInterfaceThis class represents a Network Interface made up of a name, and a list of IP addresses assigned to this interface.
PasswordAuthenticationThe class PasswordAuthentication is a data holder that is used by Authenticator.
ProxyThis class represents a proxy setting, typically a type (http, socks) and a socket address.
ProxySelectorSelects the proxy server to use, if any, when connecting to the network resource referenced by a URL.
ResponseCacheRepresents implementations of URLConnection caches.
SecureCacheResponseRepresents a cache response originally retrieved through secure means, such as TLS.
ServerSocketThis class implements server sockets.
SocketThis class implements client sockets (also called just "sockets").
SocketAddressThis class represents a Socket Address with no protocol attachment.
SocketImplThe abstract class
SocketPermissionSocketImpl
is a common superclass of all classes that actually implement sockets.This class represents access to a network via sockets.
StandardSocketOptionsDefines the standard socket options.
URIRepresents a Uniform Resource Identifier (URI) reference.
URLClass
URLClassLoaderURL
represents a Uniform Resource Locator, a pointer to a "resource" on the World Wide Web.This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.
URLConnectionThe abstract class
URLDecoderURLConnection
is the superclass of all classes that represent a communications link between the application and a URL.Utility class for HTML form decoding.
URLEncoderUtility class for HTML form encoding.
URLStreamHandlerThe abstract class
URLStreamHandler
is the common superclass for all stream protocol handlers.terface
Interface
0 0
- java网络编程(7)
- Java 7网络编程
- 【网络编程】JAVA网络编程
- java网络编程:网络基本概念
- 读书笔记-java网络编程-7URLConnection-缓存
- Java基础练习题 (7)网络编程
- Java网络编程-UDP编程
- Java 高层网络编程
- Java网络编程2
- Java网络编程3
- Java网络编程4
- Java网络服务器编程
- java网络编程1
- java网络编程2
- JAVA网络编程
- Java网络服务器编程
- java网络编程
- Java 高层网络编程
- 通用SQL数据库查询语句精华使用简介
- MongoDB的安装(windows下)
- R语言多元统计包简介:各种假设检验 统计方法 聚类分析 数据处理
- Java关键字final、static使用总结
- NSAssert的使用
- Java 7网络编程
- java shallow clone(浅克隆)与深克隆(deep clone) 笔记
- 简单选择排序
- div css总结
- 算法学习一----设计包含min函数的栈
- matlab图像处理基础
- 用VMware8 安装Ubuntu12.04
- 可变参数
- Android中的SystemClock类