jsp£¬java¼ÓͼƬˮӡ,ÎÄ×Öˮӡ
Õâ¸öÊǼÓͼƬˮӡµÄ!
package com.pic;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.awt.image.*;
import org.w3c.dom.*;
import com.sun.image.codec.jpeg.*;
import javax.imageio.*;
public class ImgBean_i{
public void ImgBean_i(){
}
public void ImgYin(String Imagename_biao,String ImgName){
try{
File _file = new File(ImgName);
Image src = ImageIO.read(_file);
int wideth=src.getWidth(null);
int height=src.getHeight(null);
BufferedImage image=new BufferedImage(wideth,height,BufferedImage.TYPE_INT_RGB);
Graphics g=image.createGraphics();
g.drawImage(src,0,0,wideth,height,null);
//ˮӡÎļþ
File _filebiao = new File(Imagename_biao);
Image src_biao = ImageIO.read(_filebiao);
int wideth_biao=src_biao.getWidth(null);
int height_biao=src_biao.getHeight(null);
g.drawImage(src_biao,wideth-110,height-30,wideth_biao,height_biao,null);
///
g.dispose();
FileOutputStream out=new FileOutputStream(ImgName);
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
encoder.encode(image);
out.close();
}
catch(Exception e){
System.out.println(e);
}
}
}
///////////// Õâ¸öÊǼÓÎÄ×ÖˮӡµÄ
package com.pic;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.awt.image.*;
import org.w3c.dom.*;
import com.sun.image.codec.jpeg.*;
import javax.imageio.*;
public class ImgBean{
public void ImgBean(){}
public void ImgYin(String s,String ImgName){
try{
File _file = new File(ImgName);
Image src = ImageIO.read(_file);
int wideth=src.getWidth(null);
int height=src.getHeight(null);
BufferedImage image=new BufferedImage(wideth,height,BufferedImage.TYPE_INT_RGB);
Graphics g=image.createGraphics();
g.drawImage(src,0,0,wideth,height,null);
//String s="www.qhd.com.cn";
g.setColor(Color.RED);
g.setFont(new Font("ËÎÌå",Font.PLAIN,20));
Font aa=new Font("ËÎÌå",Font.PLAIN,20);
g.drawString(s,wideth-150,height-10);
g.dispose();
FileOutputSt
Ïà¹ØÎĵµ£º
µÚÒ»Õ£ºjava¶ÔÏó³Ö¾Ã»¯¼¼Êõ¸ÅÊö
1£º³Ö¾Ã»¯£ºpersistence£»¶ÔÏó³Ö¾Ã»¯°üº¬Á½·½ÃæµÄÄÚÈÝ£º½«ÄÚ´æÊý¾Ý´æÈ볤ÆÚ¼ÇÒä½éÖʲ¢ÄÜ´ÓÕâЩ½éÖÊÉÏÎÞ²î´íµØ¸´Ôµ½ÄÚ´æ¡£
2£ºÍ¨¹ýʵÏÖjava.io°üÖеÄSerializable½Ó¿Ú£¨¼´¶ÔÏóÐòÁл¯ºÍ·¹ÐòÁл¯¼¼Êõ£©ÊµÏÖ£¬ÕâÖÖ¼¼ÊõºÜÖØÒª£¬ËäÈ»ÔÚÖ´Ðг־û¯Ê±Óм«´óµÄÏÞÖÆ£¬È磺ЧÂʵÍÏ¡¢²»Ö§³ÖÊÂÎñµÈ ......
1£® ¹ØÓÚ»ù´¡Êý¾ÝÀàÐÍ¡£
»¹¼ÇµÃÉÏһƬÎÄÕÂÖнáβ²¿·ÖµÄÄǸöÀý×Óô£¿
ÒòΪ¼ÆËã»úµÄ2½øÖƵÄÌØÐÔ£¬JavaÓïÑÔ£¨ÆäËûÓïÑÔºÃÏñÒ²Ò»Ñù£©ÎÞ·¨×¼È·µØ½øÐÐfloat,doubleÀàÐÍÊý¾ÝµÄ¼ÆË㣬ËùÒÔ£¬×÷ÕâЩ¼ÆËãµÄʱºòÐèÒª¿¼ÂÇʹÓÃBigDecimalן÷Àà¡£
2£® StringÀàÓëStringBufferÀà
JavaµÄStringÀàÌṩÈçϵļòµ¥µÄ×Ö·û´®Á¬½Ó·½· ......
Closing a URLClassLoader
By Michael McMahon
Complex Java programs, such as application servers, sometimes create their own class loaders using the URLClassLoader type. With URLClassLoader, applications can load classes and resources from a search path of URLs. The following URL types are ......
Ê×ÏÈ,AMF3Ëƺõ²¢²»Ö§³ÖList.ArrayListµÈÊý×éµÄ½âÎö...Java¿Í»§¶Ë´«µÝList¶ÔÏó,AMF3ÎÞ·¨½âÎöΪArray...
ÔÒòÊÇ:AMF3Ö»Ö§³Ö»ù´¡Êý¾ÝÀàÐÍ...
¹Ê,ÐèÒª½«ListµÈÊý¾Ýת»»ÎªObject[] !ÕâÑùAMF3²ÅÄܽ«Java´«µÝµÄÊý×é½âÎöΪArray...
ÓÉÓÚÊý×éµÄ´´½¨,¼´±ãÒ»¿ªÊ¼²»¸³Öµ,Ò²ÐèÒªÉèÖÃÊý×éµÄlength,Èç:String[] myString = new Str ......
1.JavaѧϰÍøÕ¾:
JavaÖÐÎÄÊÀ½çÂÛ̳ http://www.chinajavaworld.com/index.jspa
JavaÊÀ¼ÍÍø http://www.java2000.net/
Java ÖÐÎÄÕ¾ http://www.java-cn.com/
JavaѧϰÊÒ ......