Java zip ½âѹËõAPI
²ÎÊý˵Ã÷
fileName£º ±íʾÏë½âѹµÄÎļþÃû È磺c:\\aaa\a.zip
unZipDir£º ±íʾÏë½âѹµ½µÄ·¾¶ È磺c:\\ccc
public static void unZip1(String fileName, String unZipDir) {
try {
File f = new File(unZipDir);
if (!f.exists()) {
f.mkdirs();
}
BufferedOutputStream dest = null;
BufferedInputStream is = null;
ZipEntry entry;
ZipFile zipfile = new ZipFile(fileName);
Enumeration e = zipfile.entries();
while (e.hasMoreElements()) {
entry = (ZipEntry) e.nextElement();
if (entry.isDirectory()) {
makeDir(unZipDir + File.separator + entry.getName());
} else {
is = new BufferedInputStream(zipfile.getInputStream(entry));
int count;
byte data[] = new byte[BUFFER];
&nbs
Ïà¹ØÎĵµ£º
»ùÓÚjavaµÄÆóÒµËÑË÷ÒýÇæÓÅ»¯ÄÚÈݹÜÀíϵͳ
»ùÓÚJavaµÄÆóÒµËÑË÷ÒýÇæÓÅ»¯ÄÚÈݹÜÀíϵͳ(SEO-ECMS-v1.0)ÏîĿ˵Ã÷£º
ÍøÂçÉÏÁ÷´«µÄÆóÒµÍøÕ¾¹ÜÀíϵͳ´ó¶¼ºöÂÔÁËÒ»µã¼´Ã¿¸öÒ³ÃæµÄ Ò³Ãæ±êÌâ Ò³Ãæ¹Ø¼ü×Ö Ò³ÃæÃèÊöµÄÉèÖá£
¶øÕâЩǡǡÊÇËÑË÷ÒýÇæ×î¹ØÐĵĶ«Î÷¡£ÔÚ´ÓÊÂseoµÄÅóÓѵİïÖúÏ£¬¿ª·¢ÁËÕâÌ×ÊʺÏseoµÄcms¡£
ÏîÄ¿²ÉÓÃÎȶ¨ÇÒÁé» ......
JAVAËÄÖÖ»ù±¾ÅÅÐò,°üÀ¨Ã°ÅÝ·¨,²åÈë·¨,Ñ¡Ôñ·¨,SHELLÅÅÐò·¨.ÆäÖÐÑ¡Ôñ·¨ÊÇðÅÝ·¨µÄ¸Ä½ø,SHELLÅÅÐò·¨ÊÇ ²åÈë·¨µÄ¸Ä½ø.ËùÒÔ´Ó¸ù±¾ÉÏÀ´Ëµ¿ÉÒÔ¹éÄÉΪÁ½ÖÖ²»Í¬µÄÅÅÐò·½·¨:¼´:²åÈë·¨£¦Ã°ÅÝ·¨
Ò» ²åÈë·¨:±éÀúÅÅÐò¼¯ºÏ£¬Ã¿µ½Ò»¸öÔªËØÊ±£¬¶¼Òª½«Õâ¸öÔªËØÓëËùÓÐËü֮ǰµÄÔªËØ±éÀú±È½ÏÒ»±é£¬È÷ûºÏÅÅÐò˳ÐòµÄÔªËØ°¤¸öÒÆ¶¯µ½µ ......
package Utils.Sort;
/**
*ÀûÓÃðÅÝÅÅÐò·¨¶ÔÊý×éÅÅÐò£¬Êý×éÖÐÔªËØ±ØÐëʵÏÖÁËComparable½Ó¿Ú¡£
*/
public class BubbleSort implements SortStrategy
{
/**
*¶ÔÊý×éobjÖеÄÔªËØÒÔðÅÝÅÅÐòËã·¨½øÐÐÅÅÐò
......
ºÜÓôÃÆ Ò»¶ÎºÜ¼òµ¥µÄ´úÂë °ÑARGBתΪRGBA£¬½á¹ûͼÏñÑÕɫƫºì¡£
¸ãÁ˺ܾ㬲ÅÖªµÀÎÊÌâ³öÔÚÁËbyteÉíÉÏ¡£
Ò»¸öÑÕÉ«·ÖÁ¿8룬Ï뵱ȻµÄÓÃÁËbyte£¬×éºÏ³ÉÒ»¸öÏñËØ32룬¾ÍÊÇ
(r<<24)|(g<<16)|(b<<8)|(a)
ÎÊÌâ¾Í³öÔÚÁËbyteµ½intµÄת»»ÉÏ
byteÔÚJavaÖÐÊÇÓзûºÅµÄ £¨win32ÖÐÊÇunsigned char£©
Õ ......
Ç°ÃæÒѾ·ÖÎöÁËjavaÃüÁî¼ÓÔØjavaÐéÄâ»úµÄ·½·¨£¬¼´Í¨¹ýJNIºÍÐéÄâ»ú½»»¥¡£Òò´ËÎÒÃÇ¿ÉÒÔºÜÈÝÒ×µÄ×Ô¼ºÐ´ÏàÓ¦µÄÆô¶¯´úÂ룬ʵÏÖÔÚC++³ÌÐòÖÐÖ´ÐÐjava³ÌÐò£¬µ÷ÓÃjavaÀàµÄ·½·¨¡£
Òª²âÊÔµÄJavaÀà(Test.java)µÄ´úÂëÊÇ£º
public class Test {
public Test( ......