Java ½âѹrarÎļþµÄ¾µäʵÀý
2009-11-11 18:06:09
/**
*
* @author Ice*
*/
public class RarUtil{
public static void main(String args[]) throws Exception {
String compress = "D:\\test.rar";// rarѹËõÎļþ
String decompression = "D:\\";// ½âѹ·¾¶
unZip(compress, decompression);
}
/**
* ½âѹ
*
* @param compress
* rarѹËõÎļþ
* @param decompression
* ½âѹ·¾¶
*/
public static void unZip(String compress, String decompression) throws Exception {
java.lang.Runtime rt = java.lang.Runtime.getRuntime();
Process p = rt.exec("C:\\Program Files\\WinRAR\\UNRAR.EXE x -o+ -p- " + compress + " " + decompression);
StringBuffer sb = new StringBuffer();
java.io.InputStream fis = p.getInputStream();
int value = 0;
while ((value = fis.read()) != -1)
{
sb.append((char) value);
}
fis.close();
String result = new String(sb.toString().getBytes("ISO-8859-1"), "GBK");
System.out.println(result);
}
}
Ïà¹ØÎĵµ£º
Mysql
sudo netstat -tap | grep mysql
µ±ÄúÔËÐиÃÃüÁîʱ£¬Äú¿ÉÒÔ¿´µ½ÀàËÆÏÂÃæµÄÐУº
linuxidc@linuxidc-laptop:~$">linuxidc@linuxidc-laptop:~$ sudo netstat -tap | grep mysql
[sudo] password for linuxidc:
tcp &n ......
1 Boolean VS boolean
public final class Booleanextends [url=file:///G:/html_zh_CN/html/zh_CN/api/java/lang/Object.html]Object[/url]implements [url=file:///G:/html_zh_CN/html/zh_CN/api/java/io/Serializable.html]Serializable[/url], [url=file:///G:/html_zh_CN/html/zh_CN/api/java/lang ......
package com.test;
public class Jm1 {
private static int asnum;
private static char stchar;
public static void main(String[] args) {
System.out.println(getAsc("A"));
System.out.println(backchar(99));
}
/**
* ×Ö·ûתASC
*
* @param st
* @return
*/
public static int get ......
ÔÚ·Ö²¼Ê½·þÎñ¿ò¼ÜÖУ¬Ò»¸ö×î»ù´¡µÄÎÊÌâ¾ÍÊÇÔ¶³Ì·þÎñÊÇÔõôͨѶµÄ£¬ÔÚJavaµ×²ãÁìÓòÖÐÓкܶà¿ÉʵÏÖÔ¶³ÌͨѶµÄ¼¼Êõ£¬ÀýÈ磺RMI¡¢MINA¡¢ESB¡¢Burlap¡¢SOAP¡¢EJBºÍJMS µÈ£¬ÔÚj2eeÖÐ,¶Ôjavaµ×²ãÔ¶³ÌͨѶµÄ¼¼Êõ½øÐÐÁË·â×°,ÐγÉÁË Hessian ¡¢ HttpInvoker ¡¢ XFire ¡¢ Axis µÈ¶àÖÖÐÎʽµÄÔ¶³Ìµ÷Óü¼Êõ¡£ µ«¶Ô¸ß¼¶³ÌÐòÔ±¶øÑÔÈÔÐ ......
來Ô´£ºhttp://blog.csdn.net/loyoveui/archive/2007/06/22/1662154.aspx
package test;
import java.lang.reflect.Method;
public class InvokeTest {
/**
*
* main ·½·¨
* @param args
* void
*/
public static v ......