java»ñµÃÏîĿ·¾¶
/**
* »ñÈ¡·þÎñÆ÷µÄwebµØÖ·
* @return
*/
private String getWebPath(){
String _tempStr = Thread.currentThread().getContextClassLoader().getResource("").toString();
_tempStr=_tempStr.substring(6,_tempStr.length());
//½«%20»»³É¿Õ¸ñ£¨Èç¹ûÎļþ¼ÐµÄÃû³Æ´øÓпոñµÄ»°£¬»áÔÚÈ¡µÃµÄ×Ö·û´®Éϱä³É%20£©
_tempStr=_tempStr.replaceAll("%20", " ");
//²éÕÒ“WEB-INF”ÔÚ¸Ã×Ö·û´®µÄλÖÃ
int num = _tempStr.indexOf("WEB-INF");
//½ØÈ¡¼´¿É
_tempStr=_tempStr.substring(0, num);
return _tempStr;
}
Ïà¹ØÎĵµ£º
ÓÅÏȼ¶
ÔËËã·û
Ãû³Æ
1
( )
À¨ºÅ
2
[ ] , ¡£
ºó׺ÔËËã·û
3
- (Ò»ÔªÔËËã·û£¬È¡¸ºÊý) , ! , ~ , ++ , --
Ò»ÔªÔËËã·û
4
* , / , %
³Ë£¬³ý£¬È¡Ä£
5
+, -
¼Ó£¬¼õ
6
>> , << , >>>
ÒÆλÔËËã·û
7
> , < , >= , <= , instanceof
¹ØϵÔËËã·û
8
==,!=
µÈÓÚ£¬²»µÈÓÚ
9
......
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.security.*;
import javax.crypto.*;
import javax.crypto.spec.*;
/**
ÎļþÃû£ºFileEncrypter.java
JDK£º1.40ÒÔÉÏ
˵Ã÷£ºÎļþ¼ÓÃÜ
¼ÓÃÜ·½·¨£ºÈýÖØDES¼ÓÃÜ
¼ÓÃܹý³Ì£º¶ÔÑ¡ÖеÄÎļþ¼ÓÃܺóÔÚͬÎļ ......
ÓõÄÊÇCommonsÉÏ´«×é¼þ£¬ÏÂÔصØÖ·£ºCommons
ÍøÉÏÕÒµÄСÀý×Ӹĵģ¬ÐÞ¸ÄÁ˲¿·Ö´íÎó¡£
1£¬FileUpload.java
package com.fileupload;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.charset.Charset;
import java.util.Iterator;
import java.util.List;
import ja ......
import java.util.ArrayList;
import java.util.List;
public class FenYe
{
static double allpage=0; //×ÜÒ³Êý
static double currpage=0; //µ±Ç°Ò³
static double pagesize=10; //ÏÔʾÐÐ
static int sta ......