`
Jatula
  • 浏览: 273423 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
官方主頁:http://hc.apache.org/   Components HttpCore HttpClient Chunk encoded POST This example shows how to stream out a request entity using chunk encoding.   块编码POST   这个例子显示怎样用块编码请求对象过来的流(流是输入输出流那种流,数据流)   package cn.lake.util; import java.io.File; import java.io.FileInputStream; import org.ap ...
官方主頁:http://hc.apache.org/   Components HttpCore HttpClient Proxy authentication A simple example showing execution of an HTTP request over a secure connection tunneled through an authenticating proxy.   代理身份验证   一个简单的例子显示执行一个HTTP请求通过安全连接隧道通过认证代理。   package cn.lake.util; import org.apache.http ...
官方主頁:http://hc.apache.org/   Components HttpCore HttpClient Request via a proxy This example demonstrates how to send an HTTP request via a proxy.   请求通过一个代理   这个例子示范怎样去发送一个HTTP请求通过一个代理   package cn.lake.util; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.h ...
官方主頁:http://hc.apache.org/   Components HttpCore HttpClient Client authentication This example uses HttpClient to execute an HTTP request against a target site that requires user authentication.   客户身份验证   本实例用HttpClient去执行一个HTTP请求,对方网站是要求用户身份验证。   package cn.lake.util; import org.apache.http. ...
官方主頁:http://hc.apache.org/   Components HttpCore HttpClient Abort method This example demonstrates how to abort an HTTP request before its normal completion.   中止方法 这个实例示范怎样中止一个HTTP请求在正常完成前。   package cn.lake.util; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import o ...
官方主頁:http://hc.apache.org/   Components HttpCore HttpClient Manual connection release This example demonstrates how to ensure the release of the underlying HTTP connection back to the connection manager in case of a manual processing of HTTP responses.   这个例子示范了如何确保释放基本的HTTP连接回到连接管理器的情况下人工处理HTTP ...
官方主頁:http://hc.apache.org/   Components HttpCore HttpClient Response handling This example demonstrates how to process HTTP responses using a response handler. This is the recommended way of executing HTTP requests and processing HTTP responses. This approach enables the caller to concentrate on ...
commons-codec包可以从apache下载,最新版是1.3 不可逆算法 1.MD5 String str = "abc";DigestUtils.md5Hex(str); 附.net生成MD5的方法,生成内容跟java一致: String str = "abc";FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5");   2.SHA1 String str = "abc";DigestUtils.shaHex(str); 附.ne ...
package cn.lake.util; import sun.misc.BASE64Decoder; /** * Java对称加密编码:BESA64 * * @author lake_xie * */ public class B64Demo { public B64Demo() { } // 将 s 进行 BASE64 编码 public static String getBASE64(String s) { if (s == null) return null; return (new sun.misc.BASE64Encoder()).enco ...
package cn.lake.util; /** * Java对称加密编码:IDEA * * @author lake_xie * */ class IDEADemo { /* 源数据 */ private byte m_string[]; /* 目标数据 */ private byte c_string[]; /* 密钥 */ private byte k_string[]; /* 数据块 1, 2, 3, 4 */ private char X1, X2, X3, X4; /* 加密子密钥 */ private char Z[]; /* 解密子密钥 ...
Java可以直接调用Linux命令,形式如下:  Runtime.getRuntime().exec(command)    举例: 运行ls,top命令可以这样: Runtime.getRuntime().exec("ls");  但是这样执行时没有任何输出,原因:  调用Runtime.exec方法将产生一个本地的进程,并返回一个Process子类的实例,(注意:Runtime.getRuntime().exec(command)返回的是一个Process类的实例),该实例可用于控制进程或取得进程的相关信息. 由于调用Runtime.exec方法所创建的子进程没有自己 ...
window.location.reload(); //本页 window.opener.location.reload(); //父页
System.out.println("你的电脑cpu数量为:"+Runtime.getRuntime().availableProcessors());   簡簡單單!
一: 停止: # mysqladmin -r root -p123456 shutdown 其中用户是root,密码是123456 二: 启动: 假设我们不知是启动还是停止 先查看状态:# /etc/rc.d/init.d/mysql status 如果显示[FAILED]说明是停止的 我们来启动:#service mysql start   自动启动  1)察看mysql是否在自动启动列表中  [root@test1 local]# /sbin/chkconfig –list  2)把MySQL添加到你系统的启动服务组里面去  [root@test1 local]# /sbin/chkconf ...
  • 2008-12-19 23:58
  • 浏览 1749
  • 评论(0)
  • 论坛回复 / 浏览 (0 / 100759)
目前有一台服务器LINUX系统,采用SSH登陆,没有启动密钥证书服务,为了安全,现在想在服务器上启用密钥证书服务问题可能在SSH配置文件中有问题?配置如下,一、生成密钥#ssh-keygen -b 1024 -t dsaGenerating public/private dsa key pair.Enter file in which to save the key (/root/.ssh/id_dsa):(密钥对将要存的路径,括号内为默认)Created directory '/root/.ssh'.Enter passphrase (empty for no passphrase):(输入口 ...
Global site tag (gtag.js) - Google Analytics