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

ʹÓÃJavaµÈ±ÈÀýËõ·ÅͼÏñ

±¾ÎÄΪԭ´´£¬ÈçÐè×ªÔØ£¬Çë×¢Ã÷×÷Õߺͳö´¦£¬Ð»Ð»£¡
   
Ëõ·ÅͼÏñµÄ»ù±¾Ô­ÀíÊÇ´´½¨Ò»¸öÄ¿±ê´óСµÄ»­²¼£¬È»ºó¶ÁȡԴͼÏñ£¬²¢½«¸ÃͼÏñ»æÖÆÕâ¸ö»­²¼ÉÏ¡£ÎªÁËʹ³ÌÐòͨÓã¬Ô´Í¼ÏñºÍËõ·ÅºóµÄÄ¿±êͼÏñÓ¦Ó÷ֱðʹÓÃ
InputStreamºÍOutputStreamÀ´±íʾ£¬´úÂëÈçÏ£º
    
public
 
static
 
void
 scaleImage(InputStream imgInputStream,
            OutputStream imgOutputStream, 
int
 scale)
    {
        
try
        {
            Image src 
=
 javax.imageio.ImageIO.read(imgInputStream);
            
int
 width 
=
 (
int
) (src.getWidth(
null

*
 scale 
/
 
100.0
);
            
int
 height 
=
 (
int
) (src.getHeight(
null

*
 scale 
/
 
100.0
);
            BufferedImage bufferedImage 
=
 
new
 BufferedImage(width, height,
                    BufferedImage.TYPE_INT_RGB);
             bufferedImage.getGraphics().drawImage(
                    src.getScaledInstance(width, height, Image.SCALE_SMOOTH),
                    
0

0

null
);
      &nb


Ïà¹ØÎĵµ£º

java¾²Ì¬ÄÚ²¿Àà(ǶÌ×Àà)

 Èç¹ûÄã²»ÐèÒªÄÚ²¿Àà¶ÔÏóÓëÆäÍâΧÀà¶ÔÏóÖ®¼äÓÐÁªÏµ£¬ÄÇÄã¿ÉÒÔ½«ÄÚ²¿ÀàÉùÃ÷Ϊstatic¡£Õâͨ³£³ÆÎªÇ¶Ì×Àࣨnested class£©¡£ÏëÒªÀí½âstaticÓ¦ÓÃÓÚÄÚ²¿ÀàʱµÄº¬Ò壬Äã¾Í±ØÐë¼Çס£¬ÆÕͨµÄÄÚ²¿Àà¶ÔÏóÒþº¬µØ±£´æÁËÒ»¸öÒýÓã¬Ö¸Ïò´´½¨ËüµÄÍâΧÀà¶ÔÏó¡£È»¶ø£¬µ±ÄÚ²¿ÀàÊÇstaticµÄʱ£¬¾Í²»ÊÇÕâÑùÁË¡£Ç¶Ì×ÀàÒâζ×Å£º 
1. Òª ......

GroovyÓëJavaµÄ»ù±¾²»Í¬µã

1¡¢Âß¼­ÔËËã·û == £¬ÔÚjavaÖÐÔËËã·û == ÊÇÓÃ×÷¶Ô±ÈÁ½¸ö¶ÔÏóµÄ±êʶÊÇ·ñÒ»Ñù£¬»òÕß¶ÔÓÚ»ù±¾ÀàÐͶøÑÔÊý¾ÝÖµÊÇ·ñÏàµÈ¡£»ù±¾ÀàÐͺͶÔÏóÊý¾ÝÖ®¼äÊDz»¿ÉÒÔÓÃÖ±½ÓÒâÒåÉϵıȽϣ¬javaÖвÉÓõÄÊǽ«¶ÔÏóÀàÐͲðÏ䣬¶øÔÚgroovyÖУ¬ÓÉÓÚ×Ô¶¯×°ÏäµÄ¹¦ÄÜ£¬Ò»Çж¼ÊǶÔÏó¡£ÒªÊ¹µÃ == ±È½ÏÓÐͨÓÃÐÔµÄÒâÒ壬groovyͨ¹ýequals()À´ÖØÔØ == Ô¤Ëã·û¡ ......

java ÖÐÎÄתUTF 8

    /**
     * inParam:ÐèҪת»»µÄgb2312ÖÐÎÄ×Ö·û ·µ»Ø:¸ÃÖÐÎÄ×Ö·û¶ÔÓ¦µÄUTF-8±àÂëµÄ×Ö·û
     */
    public static String toUTF(String inPara) {
        char temChr;
      &n ......

JAVAÖÐÓÃÓÚ´¦Àí×Ö·û´®µÄ¡°ÈýÐֵܡ±

JAVAÖÐÓÃÓÚ´¦Àí×Ö·û´®µÄ“ÈýÐֵܔ
JAVAÖÐÓÃÓÚ´¦Àí×Ö·û´®³£ÓõÄÓÐÈý¸öÀࣺjava.lang.String¡¢java.lang.StringBuffer¡¢java.lang.StringBuilder£¬ÕâÈýÕߵĹ²Í¬Ö®´¦¶¼ÊÇfinalÀ࣬²»ÔÊÐí±»¼Ì³Ð£¬ÕâÖ÷ÒªÊÇ´ÓÐÔÄܺͰ²È«ÐÔÉÏ¿¼Âǵģ¬ÒòΪÕ⼸¸öÀà¶¼ÊǾ­³£±»Ê¹ÓÃ×ŵģ¬ÇÒ¿¼Âǵ½·ÀÖ¹ÆäÖеIJÎÊý±»ÐÞ¸ÄÓ°Ïìµ½ÆäËüµÄÓ¦Óᣠ......

¹ØÓÚJavaµÄÁ½¸öÀà DesktopºÍSystemTray

 
ÔÚJDK6ÖР,AWTÐÂÔö¼ÓÁËÁ½¸öÀà:DesktopºÍSystemTray,ǰÕß¿ÉÒÔÓÃÀ´´ò¿ªÏµÍ³Ä¬ÈÏä¯ÀÀÆ÷ä¯ÀÀÖ¸¶¨µÄURL,´ò¿ªÏµÍ³Ä¬ÈÏÓʼþ¿Í»§¶Ë¸øÖ¸¶¨µÄÓÊÏä·¢Óʼþ,ÓÃĬÈÏÓ¦ÓóÌÐò´ò¿ª»ò±à¼­Îļþ(±ÈÈç,ÓüÇʱ¾´ò¿ªÒÔtxtΪºó׺ÃûµÄÎļþ),ÓÃϵͳĬÈϵĴòÓ¡»ú´òÓ¡Îĵµ;ºóÕß¿ÉÒÔÓÃÀ´ÔÚϵͳÍÐÅÌÇø´´½¨Ò»¸öÍÐÅ̳ÌÐò.ÏÂÃæ´úÂëÑÝʾÁËDeskt ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ