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

3des¼ÓÃÜËã·¨µÄJavaʵÏÖ

import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
public class CipherTest {
public static void main(String[] args) {
try {
byte[] keydata = { (byte) 0x00, (byte) 0x01, (byte) 0x02,
(byte) 0x03, (byte) 0x04, (byte) 0x05, (byte) 0x06,
(byte) 0x07, (byte) 0x08, (byte) 0x09, (byte) 0x0a,
(byte) 0x0b, (byte) 0x0c, (byte) 0x0d, (byte) 0x0e,
(byte) 0x0f, (byte) 0x10, (byte) 0x11, (byte) 0x12,
(byte) 0x13, (byte) 0x14, (byte) 0x15, (byte) 0x16,
(byte) 0x17, };
String algorithm = "DESede";
String clearTextString = "I wanna be with you.";
String encoding = "US-ASCII";
// javax.crypto.spec.DESedeKeySpec
SecretKey key = new SecretKeySpec(keydata, algorithm);
Cipher cipher = Cipher.getInstance(algorithm);
byte[] clearText = clearTextString.getBytes(encoding);
cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] encryptedText = cipher.doFinal(clearText);
cipher.init(Cipher.DECRYPT_MODE, key);
byte[] decryptedText = cipher.doFinal(encryptedText);
System.out.println("********************************************");
System.out.println(new String(clearText, encoding));
System.out.println(bytesToString(clearText));
System.out.println("********************************************");
System.out.println(new String(encryptedText, encoding));
System.out.println(bytesToString(encryptedText));
System.out.println("********************************************");
System.out.println(new String(decryptedText, encoding));
System.out.println(bytesToString(decryptedText));
System.out.println("********************************************");
} catch (Exception e) {
e.printStackTrace();
}
}
private static String bytesToString(byte[] b) {
if (b == null)
return null;
StringBuffer sb = null;
sb = new StringBuffer();
for (int i = 0; i <


Ïà¹ØÎĵµ£º

ÀûÓÃLuceneËÑË÷JavaÔ´´úÂë

ijЩÍøÕ¾ÔÊÐíÈí¼þ¿ª·¢ÉçÍÅͨ¹ý·¢²¼¿ª·¢ÕßÖ¸ÄÏ¡¢°×ƤÊé¡¢FAQs¡¾³£¼ûÎÊÌâ½â´ð¡¿ºÍÔ´´úÂëÒÔʵÏÖÐÅÏ¢µÄ¹²Ïí¡£Ëæ×ÅÐÅÏ¢Á¿µÄÔö³¤£¬ºÍ¼¸¸ö¿ª·¢Õß¹±Ï׳ö×Ô¼ºµÄ֪ʶ¿â£¬ÓÚÊÇÍøÕ¾ÌṩËÑË÷ÒýÇæÀ´ËÑË÷Õ¾µãÉÏÏÖÓеÄËùÓÐÐÅÏ¢¡£ËäÈ»ÕâЩËÑË÷ÒýÇæ¶ÔÎı¾ÎļþµÄËÑË÷¿ÉÒÔ×öµÄºÜºÃ£¬µ«¶Ô¿ª·¢ÕßËÑË÷Ô´´úÂë×öÁ˱ȽÏÑϸñµÄÏÞÖÆ¡£ËÑË÷ÒýÇæÈÏΪԴ´úÂë ......

Java Concurrent°üѧϰ֮ConcurrentHashMap

ÔÚJava concurrent°üÖÐÓÐÕâôһ¸ö½Ó¿Ú£ºConcurrentMap¡£
ConcurrentMap¼Ì³Ð×ÔMap£¬²¢Ìí¼ÓÁ˼¸¸öеÄÔ­×Ó·½·¨£º putIfAbsent¡¢remove¡¢replace
Æä·½·¨ÕªÒªÈçÏ£º
 V
putIfAbsent(K key, V value)
          Èç¹ûÖ¸¶¨¼üÒѾ­²»ÔÙÓëij¸öÖµÏà¹ØÁª£¬Ôò½ ......

JAVA JNI

http://blog.csdn.net/hbcui1984/archive/2009/12/10/4980805.aspx
Ò»¡¢¸ÅÊö
JNI(java native interface)£¬JAVA±¾µØ½Ó¿Úµ÷Óã¬Ä¿µÄÊÇΪÁËJAVA¿ÉÒÔµ÷Óñ¾µØ³ÌÐò£¬Ö÷ÒªÓŵãÓУº
Ìá¸ßЧÂÊ£¬½â¾öÐÔÄÜÎÊÌâ
·ÀÖ¹·´±àÒ룬Ìá¸ßºËÐÄ´úÂ밲ȫÐÔ
ÔöÇ¿±¾»ú½Ó¿Úµ÷ÓÃ
ǶÈëʽ¿ª·¢Ó¦ÓÃ
    ÈçÏÂͨ¹ýÒ»¸ö×î¼òµ¥µÄÐ ......

java¶ÁÈ¡±¾µØexcelÎļþ´úÂë

package cn.com.view.read;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import jxl.read.biff.BiffException;
public class ReadExcel { ......

JAVAѧϰС±Ê¼Ç2

1.final¹Ø¼ü×ÖÐÞÊÎÀàʱ£¬ËµÃ÷ÆäÀ಻ÄÜÓÐ×ÓÀ࣬Ҳ¾ÍÊÇ˵¸ÃÀ಻Äܱ»¼Ì³Ð£¬¸ÃÀàµÄ³ÉÔ±±äÁ¿ÔÚÕâÀォ²»Æð×÷Óá£
2.final¹Ø¼ü×ÖÐÞÊη½·¨Ê±£¬ËµÃ÷¸Ã·½·¨²»Äܱ»ÖØд£¬ÒòΪÀ඼²»Äܱ»¼Ì³ÐÁË£¬·½·¨¾Í¸ü²»ÄÜÖØдÁË¡£
3.ÀàÀï¿ÉÒÔº¬ÓÐfinal¹Ø¼ü×ÖÐÞÊεķ½·¨¡£
4.ÔÚjavaÀ³éÏóÀà×îÉÙÒªº¬ÓÐÒ»¸ö³éÏó·½·¨£¬ÈÃËüµÄ×ÓÀàȥʵÏÖÕâ¸ö³éÏó·½· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ