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

Äêµ×ÊÕ²ØϵÁÐ Java°²È«¹¤¾ß,Éú³ÉMD5,Base64,UUID


/*
* EncryptUtils.java
* Copyright (C) 2007-3-19 <JustinLei@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
package org.lambdasoft.utils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Date;
import java.util.UUID;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
/**
* @author TangLei <justinlei@gmail.com>
* @date 2008-11-28
*/
public class EncryptUtils {
static final int S11 = 7;
static final int S12 = 12;
static final int S13 = 17;
static final int S14 = 22;
static final int S21 = 5;
static final int S22 = 9;
static final int S23 = 14;
static final int S24 = 20;
static final int S31 = 4;
static final int S32 = 11;
static final int S33 = 16;
static final int S34 = 23;
static final int S41 = 6;
static final int S42 = 10;
static final int S43 = 15;
static final int S44 = 21;
static final byte[] PADDING = { -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0 };
private long[] state = new long[4]; // state (ABCD)
private long[] count = new long[2]; // number of bits, modulo 2^64 (lsb first)
private byte[] buffer = new byte[64]; // input buffer
public static String digestHexStr;
private static byte[] digest = new byte[16];
public


Ïà¹ØÎĵµ£º

java xml

First
Parsing an XML Document
To read an XML document, you need a DocumentBuilder object, which you get from a DocumentBuilderFactory, like this:DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
You can now read a docu ......

javaÃæÊÔÌâ


125
Ìõ³£¼ûµÄ
java
ÃæÊÔ±ÊÊÔÌâ´ó»ã×Ü
1.
³éÏó£º
¡¡¡¡³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2.
¼Ì³Ð£º
¡¡¡¡¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎģР......

java¶ÔmysqlÊý¾Ý¿âµÄµ¼Èëµ¼³ö

//µ¼³ö
String mysql="mysqldump -uroot -proot  --opt databasename > d:/test.sql";    
java.lang.Runtime.getRuntime().exec("cmd /c "+mysql);   
//µ¼Èë
String mysql="mysqladmin -uroot -proot create databasename";    
java.lang.Runt ......

JAVAĿ¼ѡÔñ¿òµÄ½â¾ö°ì·¨

FileDialogÖ»ÄÜÑ¡ÔñÎļþ¶ø²»ÄÜÑ¡ÔñÎļþ¼Ð¡£JFileChooserÓÖÌ«´ó£¬²»Ì«ºÃ¿´£¬¹Äµ·Á˺ÃÒ»»áÖÕÓÚ½â¾öÁË¡£
¼Ç¼һϹؼü²¿·Ö´úÂ룬ÒÔ±¸²éÓá£
final JButton choose=new JButton("Ñ¡Ôñ´æ´¢ÎļþĿ¼");
final JTextField dir=new JTextField();

final JFileChooser chooser=new JFileChooser();
chooser.setFileSe ......

Java·þÎñ¶Ë½ÓÊÜget·½Ê½´«Ë͵ĺº×ÖתÂë·½·¨

1.ÓÃnew String(request.getParameter("name").getBytes("ISO-8859-1"),"GBK") ·½Ê½½øÐÐתÂë
2.ÉèÖÃtomcat£ºÔÚtomcatµÄconfĿ¼ÏÂÕÒµ½server.xmlÎļþ£¬ÔÚConnector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000" ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ