¹ØÓÚJava Advanced Imaging(JAI)µÄÒ»µã»ýÀÛ
JAIµÄÈ·ÊǸö²»´íµÄ¶«¶«£¬Í¼ÐÎäÖȾÉÏÌṩÁ˱ȽϺõÄÀà·â×°ÒÔ¼°¿çƽ̨ÐÔ¡£²»ÖªµÀΪºÎJAI¾ÍÔÚ2006ÄêÖ¹²½ÔÚ1.1.3µÄ°æ±¾ÏÂÁË£¬Äª·ÇSun(Oracle)ÕæµÄÈ¥×öJava 2DµÄ·á¸»È¥ÁË¡£ÔÝʱ»¹Ã»Óп´µ½Java 2D·½ÃæµÄ×ÊÁÏ£¬ÏÈ°ÑJAIµÄÄÚÈÝÌù³öÀ´¡£
ÏÂÔØJAI¿ÉÒÔÈ¥ÕâÀï http://download.java.net/media/jai/builds/release/1_1_3/
ÏëÒªÁ˽âËüµÄ°²×°£¬¿ÉÒÔÈ¥ÕâÀï²é¿´¸÷²Ù×÷ϵͳµÄ°²×°·½·¨ http://download.java.net/media/jai/builds/release/1_1_3/INSTALL.html
ÒýÁËÒ»¶Î¡¶Programming in Java Advanced Imaging¡·pdfÖеÄÒ»¶Î´úÂë¡£Õâƪpdf¿ÉÒÔ´ÓÕâÀïϵ½ http://dlc.sun.com/pdf/806-5413-10/806-5413-10.pdf
import java.awt.Frame;
import java.awt.image.renderable.ParameterBlock;
import java.io.IOException;
import javax.media.jai.Interpolation;
import javax.media.jai.JAI;
import javax.media.jai.RenderedOp;
import javax.media.jai.widget.ScrollingImagePanel;
import com.sun.media.jai.codec.FileSeekableStream;
public class JAISampleProgram {
/**
* @param args
*/
public static void main(String[] args) {
if(args.length!=1){
System.out.println("Usage: java JAISampleProgram input image_filename");
System.exit(-1);
}
FileSeekableStream stream = null;
try {
stream = new FileSeekableStream(args[0]);
} catch (IOException e) {
e.printStackTrace();
System.exit(0);
}
RenderedOp image1=JAI.create("stream", stream);
Interpolation interp = Interpolation.getInstance(Interpolation.INTERP_BILINEAR);
ParameterBlock params = new ParameterBlock();
params.addSource(image1);
params.add(2.0F);
params.add(2.0F);
params.add(0.0F);
params.add(0.0F);
params.add(interp);
RenderedOp image2 = JAI.create("scale", params);
int width = image2.getWidth()
Ïà¹ØÎĵµ£º
ListµÄÓ÷¨
List°üÀ¨List½Ó¿ÚÒÔ¼°List½Ó¿ÚµÄËùÓÐʵÏÖÀà¡£ÒòΪList½Ó¿ÚʵÏÖÁËCollection½Ó¿Ú£¬ËùÒÔList½Ó¿ÚÓµÓÐCollection½Ó¿ÚÌṩµÄËùÓг£Ó÷½·¨£¬ÓÖÒòΪListÊÇÁбíÀàÐÍ£¬ËùÒÔList½Ó¿Ú»¹ÌṩÁËһЩÊʺÏÓÚ×ÔÉíµÄ³£Ó÷½·¨£¬Èç±í1Ëùʾ¡£
±í1 List½Ó¿Ú¶¨ÒåµÄ³£Ó÷½·¨¼°¹¦ÄÜ
´Ó±í1¿ÉÒÔ¿´³ö£¬List½Ó¿ÚÌṩµÄÊʺÏÓÚ×ÔÉíµÄ ......
¡¾×ª¡¿JavaÖеÄλÔËËã·û
Ô×÷ÕߣºRosen Jiang ³ö´¦£ºhttp://www.blogjava.net/rosen
ÒÆλÔËËã·û
°üÀ¨£º
“>> ÓÒÒÆ”£»“<< ×óÒÆ”£»“>>> ÎÞ·ûºÅÓÒÒÆ”
Àý×Ó£º
-5>>3=-1
1111 1111 1111 1111 1111 1111 1111 ......
http://xxw8393.blog.163.com/blog/static/37256834200993051226320/
java¶Ôì¶ÎÄ×ֵıàÂëÊÇÒÔ unicodeΪ»ù´¡£¬Òò´Ë£¬ÈôÊÇÒÔZipInputStream¼°ZipOutputStreamÀ´´¦ÀíѹËõ¼°½âѹËõµÄ¹¤×÷£¬Åöµ½ÖÐÎĵµÃû»ò·¾¶£¬Äǵ±È»ÊÇÒÔunicodeÀ´´¦ÀíÂÞ£¡µ«ÊÇ£¬ÏÖÔÚÊÐÃæÉϵÄѹËõ¼°½âѹËõÈíÌ壬ÀýÈçwinzip£¬È´ÊDz»Ö§Ô®unicodeµÄ£¬Ò»Åöµ½µµÃûÒ ......
1¡¢Êä³öÖÐÎÄ¡£
JAVAÔÚÍøÂç´«ÊäÖÐʹÓõıàÂëÊÇ"ISO-8859-1"£¬¹ÊÔÚÊä³öʱÐèÒª½øÐÐת»¯£¬È磺
String str="ÖÐÎÄ";
str=new String(str.getBytes("GB2312"),"8859_1");
µ«Èç¹ûÔÚ±àÒë³ÌÐòʱ£¬Ê¹ÓõıàÂëÊÇ“GB2312”,ÇÒÔÚÖÐÎÄƽ̨ÉÏÔËÐд˳ÌÐò£¬²»»á³öÏÖ´ËÎÊÌ⣬һ¶¨Òª×¢Òâ¡£
2¡¢´Ó²ÎÊýÖжÁÈ¡ÖÐÎÄ
ÕâÕýºÃÓëÊä³öÏ ......
1.½âÊÍ
ÒòΪjspÓõ½ÁËSiteDataÀ࣬¶øSiteData¼Ì³ÐBasePageÀ࣬
ËùÒÔBasePage¹¹Ô캯Êý
BasePage¹¹Ô캯Êý
initializeByCityCodeº¯Êýmain
keyµÄÖµmain.UpImages
vµÄÖµmain.UpImages
2.Ö´ÐÐÍê BasePage.java
ÖеÄinitCommon()ºó£¬
Ìøµ½SiteData.java ÖÐµÄ process();·½·¨£¬
public SiteData(HttpServletR ......