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

JavaͼƬ´¦Àí

import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.imageio.ImageIO;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGEncodeParam;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
public class ImageUtil {
   
    public static int ORIGINAL_BANK_IMAGE = 1;//ԭʼͼ
    public static int THUMBNAIL_BANK_IMAGE = 2;//ËõÂÔͼ
    /**
     *
     * @param src ½«ÒªÑ¹ËõµÄͼƬ
     * @param destFileName ѹËõºóµÄÎļþÃû
     * @param width ¸ß¶È
     * @param height ¿í¶È
     * @param quality ѹËõÇåÎú¶È ½¨ÒéΪ1.0
     * @param percentage ÊÇ·ñµÈ±ÈѹËõ Èôtrue¿í¸ß±ÈÂʽ«½«×Ô¶¯µ÷Õû
     * @return
     */
    public static File compress(File src, String destFileName, int width, int height,
            float quality, boolean percentage) {
        try {
            Image srcImage = ImageIO.read(src);
            if (percentage) {
                // ΪµÈ±ÈËõ·Å¼ÆËãÊä³öµÄͼƬ¿í¶È¼°¸ß¶È
                double rate1 = ((double) srcImage.getWidth(null))
                        / (double) width + 0.1;
         &nbs


Ïà¹ØÎĵµ£º

java·´Éä¾­µäʵÀý

JavaÌṩÁËÒ»Ì×»úÖÆÀ´¶¯Ì¬Ö´Ðз½·¨ºÍ¹¹Ôì·½·¨£¬ÒÔ¼°Êý×é²Ù×÷µÈ£¬ÕâÌ×»úÖƾͽЗ—·´Éä¡£·´Éä»úÖÆÊÇÈç½ñºÜ¶àÁ÷Ðпò¼ÜµÄʵÏÖ»ù´¡£¬ÆäÖаüÀ¨Spring¡¢HibernateµÈ¡£Ô­ÀíÐÔµÄÎÊÌâ²»ÊDZ¾ÎĵÄÖص㣬½ÓÏÂÀ´ÈÃÎÒÃÇÔÚʵÀýÖÐѧϰÕâÌ×¾«²ÊµÄ»úÖÆ¡£
1. µÃµ½Ä³¸ö¶ÔÏóµÄÊôÐÔ
public Object getProperty(Object owner, String f ......

JAVA java.io.InvalidClassException¼±½â


JAVA--java.io.InvalidClassException¼±½â
×ֺţºT|T
JAVA--java.io.InvalidClassException¼±½â
java.io.InvalidClassException: message.RegisterMessage; local class incompatible: stream classdesc serialVersionUID = 5540404719929042644, local class serialVersionUID = -8915824483106432775
»Ø´ð£º
×î¼Ñ ......

JAVAÕýÔò±í´ïʽ PatternºÍMatcher

JAVAÕýÔò±í´ïʽ--PatternºÍMatcher
×÷Õߣº³Â¹ã¼Ñ    ÎÄÕÂÀ´Ô´£ºwww.fooldock.com
·¢²¼ÈÕÆÚ£º2004Äê11ÔÂ19ÈÕ    ä¯ÀÀ´ÎÊý£º2585´Î
ÏÖÔÚJDK1.4ÀïÖÕÓÚÓÐÁË×Ô¼ºµÄÕýÔò±í´ïʽAPI°ü£¬JAVA³ÌÐòÔ±¿ÉÒÔÃâÈ¥ÕÒµÚÈý·½ÌṩµÄÕýÔò±í´ïʽ¿âµÄÖÜÕÛÁË£¬ÎÒÃÇÏÖÔÚ¾ÍÂíÉÏÀ´Á˽âÒ»ÏÂÕâ¸öSUNÌṩµÄ³Ù ......

Ãô½Ý¿ª·¢Öбàд¸ßÖÊÁ¿Java´úÂë

Ãô½Ý¿ª·¢µÄÀíÄîÒѾ­Á÷ÐÐÁ˺ܳ¤µÄʱ¼ä£¬ÔÚÃô½Ý¿ª·¢ÖеĿª·¢µü´ú½×¶ÎÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÎå¸ö²½Ö裬À´ÓÐЧµÄÌá¸ßÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿¡£
JavaÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÓÉÓÚ¿ª·¢ÈËÔ±µÄ¾­Ñé¡¢Java´úÂë±àдϰ¹ß£¬ÒÔ¼°È±·¦Í³Ò»µÄ±ê×¼ºÍ¹ÜÀíÁ÷³Ì£¬ÍùÍùµ¼ÖÂÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿½Ï²î£¬ÄÑÓÚά
»¤£¬ÐèÒª½Ï´óµÄ²âÊÔͶÈëºÍÖÜÆÚµÈÎÊÌâ¡£ÕâЩÎÊÌâÔÚÒ»¸ ......

java HttpClient PostʵÀý

private void postMethod(String url) throws IOException
 {    
  url = "http://www.newsmth.net/bbslogin2.php";
  PostMethod postMethod = new PostMethod(url);
  // ÌîÈë¸÷¸ö±íµ¥ÓòµÄÖµ
  NameValuePair[] data = { new NameValuePair("id ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ