Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÀûÓÃJavaʵÏÖѹËõÓë½âѹËõ£¨zip¡¢gzip£©Ö§³ÖÖÐÎÄ·¾¶

¹Ø¼ü×Ö: zip gzip
zip°çÑÝ׏鵵ºÍѹËõÁ½¸ö½ÇÉ«£»gzip²¢²»½«Îļþ¹éµµ£¬½öÖ»ÊǶԵ¥¸öÎļþ½øÐÐѹËõ£¬ËùÒÔ£¬ÔÚUNIXƽ̨ÉÏ£¬ÃüÁîtarͨ³£ÓÃÀ´´´½¨Ò»¸öµµ°¸Îļþ£¬È»ºóÃüÁîgzipÀ´½«µµ°¸ÎļþѹËõ¡£
Java
I/OÀà¿â»¹ÊÕ¼ÁËһЩÄܶÁдѹËõ¸ñʽÁ÷µÄÀà¡£ÒªÏëÌṩѹËõ¹¦ÄÜ£¬Ö»Òª°ÑËüÃÇ°üÔÚÒÑÓеÄI/OÀàµÄÍâÃæ¾ÍÐÐÁË¡£ÕâЩÀ಻ÊÇReaderºÍWriter£¬¶øÊÇInputStreamºÍOutStreamputµÄ×ÓÀà¡£ÕâÊÇÒòΪѹËõËã·¨ÊÇÕë¶Ôbyte¶ø²»ÊÇ×Ö·ûµÄ¡£
Ïà¹ØÀàÓë½Ó¿Ú£º
Checksum

½Ó¿Ú£º±»ÀàAdler32ºÍCRC32ʵÏֵĽӿÚ
Adler32

£ºÊ¹ÓÃAlder32Ëã·¨À´¼ÆËãChecksumÊýÄ¿
CRC32

£ºÊ¹ÓÃCRC32Ëã·¨À´¼ÆËãChecksumÊýÄ¿

CheckedInputStream

£ºInputStreamÅÉÉúÀ࣬¿ÉµÃµ½ÊäÈëÁ÷µÄУÑéºÍChecksum£¬ÓÃÓÚУÑéÊý¾ÝµÄÍêÕûÐÔ
CheckedOutputStream

£ºOutputStreamÅÉÉúÀ࣬¿ÉµÃµ½Êä³öÁ÷µÄУÑéºÍChecksum£¬
ÓÃÓÚУÑéÊý¾ÝµÄÍêÕûÐÔ

DeflaterOutputStream
£ºÑ¹ËõÀàµÄ»ùÀà¡£
ZipOutputStream

£ºDeflaterOutputStreamµÄÒ»¸ö×ÓÀ࣬°ÑÊý¾ÝѹËõ³ÉZipÎļþ¸ñʽ¡£
GZIPOutputStream

£ºDeflaterOutputStreamµÄÒ»¸ö×ÓÀ࣬°ÑÊý¾ÝѹËõ³ÉGZipÎļþ¸ñʽ
InflaterInputStream

£º½âѹËõÀàµÄ»ùÀà
ZipInputStream

£ºInflaterInputStreamµÄÒ»¸ö×ÓÀ࣬ÄܽâѹËõZip¸ñʽµÄÊý¾Ý
GZIPInputStream

£ºInflaterInputStreamµÄÒ»¸ö×ÓÀ࣬ÄܽâѹËõZip¸ñʽµÄÊý¾Ý

ZipEntry
Àࣺ±íʾ ZIP
ÎļþÌõÄ¿
ZipFile
Àࣺ´ËÀàÓÃÓÚ´Ó ZIP Îļþ¶ÁÈ¡ÌõÄ¿
ÓÃGZIP½øÐжԵ¥¸öÎļþѹËõ

GZIPµÄ½Ó¿Ú±È½Ï¼òµ¥£¬Òò´ËÈç¹ûÄãÖ»Ðè¶ÔÒ»¸öÁ÷½øÐÐѹËõµÄ»°£¬¿ÉÒÔʹÓÃËü¡£µ±È»Ëü¿ÉÒÔѹËõ×Ö·ûÁ÷£¬Óë¿ÉÒÔѹËõ×Ö½ÚÁ÷£¬ÏÂÃæÊÇÒ»¸ö¶ÔGBK±àÂë¸ñʽµÄÎı¾Îļþ½øÐÐѹËõµÄ¡£
ѹËõÀàµÄÓ÷¨·Ç³£¼òµ¥£»Ö»ÒªÓÃGZIPOutputStream
»òZipOutputStream°ÑÊä³öÁ÷°üÆðÀ´£¬ÔÙÓÃGZIPInputStream
»òZipInputStream°ÑÊäÈëÁ÷°üÆðÀ´¾ÍÐÐÁË¡£Ê£ÏµĶ¼ÊÇЩÆÕͨµÄI/O²Ù×÷¡£

Java´úÂë
import
 java.io.BufferedOutputStream;
  
import
 java.io.BufferedReader;
  
import
 java.io.FileInputStream;   
import
 java.io.FileOutputStream;
  
import
 java.io.IOException;
  
import
 java.io.InputStreamReader;
  
import
 java.util.zip.GZIPInputStream;
  
import
&n


Ïà¹ØÎĵµ£º

ÆóÒµ¼¶JAVA¿ìËÙ¿ª·¢

²úÆ·ÏÂÔØhttp://www.fastunit.com/download/download.html ¸ñʽ
´óС£¨bytes£©
·¢²¼ÈÕÆÚ FastUnit 2.9 ÆÕ¼°°æ*
zip
16,707,279 / 15.9M
2010-05-18
µã»÷ÏÂÔØ ¡¶FastUnit¿ª·¢Êֲᡷ
pdf
1,716,405 / 1.63M
2010-05-13
µã»÷ÏÂÔØ ¡¶FastUnit¹ÜÀíÊֲᡷ
pdf
300,1 ......

±£»¤ÄãµÄJAVA / .net ³ÌÐò,ÖÕ¼«±ÜÃâ±»·´±àÒë·½·¨Ñо¿

±£»¤ÄãµÄJAVA / .net ³ÌÐò,ÖÕ¼«±ÜÃâ±»·´±àÒë·½·¨Ñо¿
·´±àÒëÕæµÄÈÃJAVA / .net ÖÆ×÷ÕßÌÖÑáµÄ¶«Î÷¡£Ä㻨´óÁ¿µÄ¾«Á¦×öÁËÒ»¸öºÜºÃµÄÈí¼þ£¬È´ÓÐÈ˵ÁÓã¬
µÁÓö¼ËãÁË
È˼һ¹ÓÃÀ´ÉÌÒµ...
¾ÍÏñijÎÄ˵µÄ.ÄãµÄÈí¼þÂò XXXXXXXX´óÔª.È˼ҹ«Ë¾Âò200Ôª.....
Ôõô×öµ½ÄØ£¿¾ÍÊÇͨ¹ý·´±àÒë¡£
ÎÒÃÇ¿ÉÒÔ¿´µ½
¾ÍËã±£»¤ºÜÇ¿µÄreflector4/ ......

Java±ÊÊԱؿ¼Ì⣨¶þ£©µ½µ×´´½¨Á˼¸¸öString¶ÔÏó

ÎÒÃÇÊ×ÏÈÀ´¿´Ò»¶Î´úÂ룺
Java´úÂë £º
String str=new String("abc");
½ô½Ó×ÅÕâ¶Î´úÂëÖ®ºóµÄÍùÍùÊÇÕâ¸öÎÊÌ⣬ÄǾÍÊÇÕâÐдúÂ뾿¾¹´´½¨Á˼¸¸öString¶ÔÏóÄØ£¿Ïà
ÐÅ´ó¼Ò¶ÔÕâµÀÌâ²¢²»Ä°Éú£¬´ð°¸Ò²ÊÇÖÚËùÖÜÖªµÄ£¬2¸ö¡£½ÓÏÂÀ´ÎÒÃǾʹÓÕâµÀÌâÕ¹¿ª£¬Ò»Æð
»Ø¹ËÒ»ÏÂÓë´´½¨String¶ÔÏóÏà¹ØµÄһЩJAVA֪ʶ¡£
ÎÒÃÇ¿ÉÒÔ°ÑÉÏÃæÕâÐдúÂë· ......

´«ÖDz¥¿ÍjavaÅàѵ java»ù´¡Ö®MYSQL

³é¿Õ¸´Ï°ÁËÏÂÕýÔò±í´ïʽµÄÓ÷¨£¬ºÜ¶àÇ°Á½¸öÔÂѧЩµÄ¶«Î÷£¬ÏÖÔÚ¶¼ÊÖÉúÁË£¬Ö»Óв»¶ÏµÄ¸´Ï°²ÅÄÜ×öµ½ÕÆÎÕ£¡
½ñÌ쿪ʼ½²Êý¾Ý¿âÁË£¬MYSQL£¬È»ºóÂíÉϾͻῪʼ½Ó´¥¿ò¼Ü····¹þ¹þ£¬ÒªÕæµÄ¿ªÊ¼×öÏîÄ¿ÁË
¼¤¶¯¹þ¡£¡£¡£¡£
ÕýÔò±í´ïʽÊÇ´ÓJDK1.5Ö®ºóÍƳöµÄ¼ò»¯×Ö·û´®²Ù×÷µÄ£¬ÓÃÌØÊâµÄ·ûºÅ´ú±í¶Ô×Ö·û´®µÄÔËÓ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ