易截截图软件、单文件、免安装、纯绿色、仅160KB

socket, nio socket,及xml传递object 方法

1:如何通过socket代理来访问服务端:
String proxyHost = 
"192.168.204.212"
;   

String proxyPort = 
"1080"
;   

  

//通知Java要通过代理进行连接。
正在装载数据……
  

System.getProperties().put(
"socksProxySet"
,
"true"
);   

//指定代理所在的机器
  

System.getProperties().put(
"socksProxyHost"
,proxyHost);   

//指定代理监听的端口。
  

System.getProperties().put(
"socksProxyPort"
,proxyPort);    

  

String host = 
"134.01.69.80"
;   

int
 port = 
12086
;   

System.out.println(
"connetioning:"
 + host + 
":"
 + port);   

server = 
new
 Socket(host, port);  

二:老socket传递Object对象:
要传递的对象:
public
 
class
 Employee 
implements
 Serializable {    

  

       
private
 
int
 employeeNumber;    

       
private
 String employeeName;    

  

       Employee(
int
 num, String name) {    

          employeeNumber = num;    

          employeeName= name;    

       }    

  

        
public
 
int
 getEmployeeNumber() {    

      


相关文档:

dom4j用XPath解析xml 遇到的问题

使用dom4j解析XML时,要快速获取某个节点的数据,使用XPath是个不错的方法,dom4j的快速手册里也建议使用这种方式,标题都写的这么阔气:Powerful Navigation with XPath,呵呵。
方法是使用Document的selectNodes(String XPath)方法,代码写法:
List l = doc.selectNodes("//COLS/COL1");
执行时却抛出以下异常:
Exc ......

xml解析

xml
<mime>
<content>
<type>text/plain</type>
<big>357</big>
<text>D:\\cybercourttext2009101410241364.txt</text>
</content>
<content>
<type>text/plain</type>
<big>357</big>
<text>D:\\cybercourttext2009 ......

vim html xml 自动补全(在closetag.vim 上作了点修改)

当输入 》时自动补全 当输入《/时自动补全
“=================================
" File: closetag.vim
" Summary: Functions and mappings to close open HTML/XML tags
" Uses: <C-_> -- close matching open tag
" Author: Steven Mueller <di ......

spring xercesImpl xml 解析问题

问题描述:
   jboss应用服务器,使用spring 
   无法启动服务,错误日志:
[org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@155d3a3] does not
support XML Schema. Are you running on Java 1.4 or below with Apache
Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号