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

java¶ÔÎļþ½øÐмÓÃܽâÃܲÙ×÷

½Ó¿ÚÀࣺ
package JFFileEncrypt;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import javax.crypto.KeyGenerator;
import javax.crypto.spec.SecretKeySpec;
/**
 * ¹¦ÄÜ£º¶ÔÎļþ¼ÓÃܽâÃܲÙ×÷
 * @author jiangfeng
 *
 */
public interface FileEncryptInterface
{
 /**
  * ¼ÓÃÜËã·¨
  * @param key
  * @param FileName
  * @return
  */
 public boolean DESEncrypt(Key key, String FileName);
 /**
  * ½âÃÜËã·¨
  * @param FileName
  * @param key
  * @return
  */
 public boolean DESDecrypt(String FileName, Key key);
 /**
  * ×Ô¶¨ÒåÒ»¸ökey
  */
 public Key getKey(String keyRule);
 /**
  * µÚ¶þÖÖ²úÉúkeyµÄ·½·¨
  * @return
  */
 public Key getKey2();
}
½Ó¿ÚʵÏÖÀࣺ
package JFFileEncrypt;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;
/**
 * ¹¦ÄÜ£º¶ÔÎļþ¼ÓÃܽâÃܲÙ×÷
 * @author jiangfeng
 *
 */
public class FileEncryptImpal implements FileEncryptInterface
{
 /**
  * ¹¦ÄÜ£º¼ÓÃÜÎļþ
  */
 public boolean DESEncrypt(Key key, String FileName)
 {
  boolean result = false;
  StringBuffer sb = null;
  try
  {
   /*
    * CipherÀàÎÞ¹¹Ôì·½·¨£¬µ÷ÓÃgetInstance()·½·¨½«ËùÇëÇóת»»µÄÃû³Æ´«µÝ¸øËü ²ÎÊýΪ ת»»µÄÃû³Æ£¬ÀýÈç
    * DES/C


Ïà¹ØÎĵµ£º

È«ÃæÕÆÎÕjavaö¾ÙÀàÐÍ

ö¾ÙÀàÐÍÊÇJDK5.0µÄÐÂÌØÕ÷¡£SunÒý½øÁËÒ»¸öȫеĹؼü×ÖenumÀ´¶¨ÒåÒ»¸öö¾ÙÀà¡£ÏÂÃæ¾ÍÊÇÒ»¸öµäÐÍö¾ÙÀàÐ͵Ķ¨Ò壺
Java´úÂë
public enum Color{   
    RED,BLUE,BLACK,YELLOW,GREEN   
}  
public enum Color{
RED,BLUE,BLACK,YELLOW,GREEN
}
ÏÔ ......

Java³£ÓôúÂë

     /**
     * ´´½¨Ò»¸öеÄÎļþ
     * @param relativePath Ïà¶Ô·¾¶
     * @param fileName ÎļþÃû
     * @return
     * @throws IOException
     */
    public File cre ......

Create WAP Push SMS Messages (from C# to JAVA)

 ÖíÄêÎÞÁÄ,¸ÄÁËÒ»¸ö´úÂ룬ÓеãD°æÄǸöÒâ˼£¬°ÑWAP PUSHµÄC#´úÂë¸Äµ½ÁËJAVA
Ô­À´³ö´¦£º
http://www.codeproject.com/cs/internet/wappush.asp
¸Ä¹ýºóµÄ´úÂëÔÚÏÂÃ棬³ÌÐòºÃÏñ¿ÉÒÔÊä³öÁËWAPPUSHµÄ½á¹¹»¯µÄ¶«Î÷£¬µ«ÊÇ£¬Ã»ÓÐÔÚCMPPЭÒéÉϲâÊÔͨ¹ý¡£
¹²7¸öÎļþ£º
package com.wap.wbxml;
public class Runner {
&nbs ......

¡¾×ªÔØ¡¿Javaѧϰ·¾¶

Javaѧϰ·¾¶£¨Ò»£©¹¤¾ßƪ
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJDKÊÇSun¹«Ë¾·¢²¼µÄJDK£¬³ýÁËSunÖ®Í⣬»¹Óкܶ๠......

java¶Ô¸÷ÖÖÎļþµÄ²Ù×÷Ïê½â

 javaÖÐÌṩÁËioÀà¿â£¬¿ÉÒÔÇáËɵÄÓÃjavaʵÏÖ¶ÔÎļþµÄ¸÷ÖÖ²Ù×÷¡£ÏÂÃæ¾ÍÀ´ËµÒ»ÏÂÈçºÎÓÃjavaÀ´ÊµÏÖÕâЩ²Ù×÷¡£

н¨Ä¿Â¼<%@ page contentType="text/html;charset=gb2312"%>
<%
//String URL = request.getRequestURI();
String filePath="C:\\²âÊÔ\\";
filePath=filePath.toString(); ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ