java ËõÂÔͼ ʵÏÖ
import java.awt.image. * ;
import com.sun.image.codec.jpeg. * ;
public class poiReadDoc {
Image img = null;
int width = 0,height =0;
String destFile = "";
public void readImg(String fileName) throws IOException{
File _file = new File(fileName); // ¶ÁÈëÎļþ
// String srcFile = _file.getName();
destFile = fileName.substring( 0 , fileName.lastIndexOf(".")) + " _mini.jpg " ;
img = javax.imageio.ImageIO.read(_file); // ¹¹ÔìImage¶ÔÏó
width = img.getWidth( null ); // µÃµ½Ô´Í¼¿í
height = img.getHeight( null ); // µÃµ½Ô´Í¼³¤
}
public void resize( int w, int h) throws IOException {
BufferedImage _image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
_image.getGraphics().drawImage(img, 0 , 0 , w, h, null ); // »æÖÆËõСºóµÄͼ
FileOutputStream out = new FileOutputStream(destFile); // Êä³öµ½ÎļþÁ÷
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
encoder.encode(_image); // ½üJPEG±àÂë
out.close();
}
public void resize( double t) throws IOException {
int w = ( int ) (width * t);
int h = ( int ) (height * t);
resize(w, h);
}
public&n
Ïà¹ØÎĵµ£º
½«ÏÂÔØºóµÄÎļþ½â°ü£¬µÃµ½jxl.jar£¬·ÅÈëclasspath£¬°²×°¾ÍÍê³ÉÁË¡£
»ù±¾²Ù×÷
Ò»¡¢´´½¨Îļþ
ÄâÉú³ÉÒ»¸öÃûΪ“²âÊÔÊý¾Ý.xls”µÄExcelÎļþ£¬ÆäÖеÚÒ»¸ö¹¤×÷±í±»ÃüÃûΪ“µÚÒ»Ò³”£¬´óÖÂЧ¹ûÈçÏ£º
´úÂ루CreateXLS.java£©£º
//Éú³ÉExcelµÄÀà
import java.io.*;
import jxl.*;
import jxl.write. ......
jvm classLoader architecture£º
1. Bootstrap ClassLoader/Æô¶¯Àà¼ÓÔØÆ÷
Ö÷Òª¸ºÔðjdk_home/libĿ¼ÏµĺËÐÄ api »ò -Xbootclasspath Ñ¡ÏîÖ¸¶¨µÄjar°ü×°È빤×÷¡£
2. Extension ClassLoader/À©Õ¹Àà¼ÓÔØÆ÷
Ö÷Òª¸ºÔðjdk_home/lib/extĿ¼ÏµÄjar°ü»ò -Djava.ext.dirs Ö¸¶¨Ä¿Â¼ÏµÄjar°ü×°È빤×÷¡£
3 ......
1.ËãÊõÔËËã·û
JavaµÄËãÊõÔËËã·û·ÖΪһԪÔËËã·ûºÍ¶þÔªÔËËã·û¡£Ò»ÔªÔËËã·ûÖ»ÓÐÒ»¸ö²Ù×÷Êý£»¶þÔªÔËËã·ûÓÐÁ½¸ö²Ù×÷Êý£¬ÔËËã·ûλÓÚÁ½¸ö²Ù×÷ÊýÖ®¼ä¡£ËãÊõÔËËã·ûµÄ²Ù×÷Êý±ØÐëÊÇÊýÖµÀàÐÍ¡£
(1)Ò»ÔªÔËËã·û£º
Ò»ÔªÔËËã·ûÓУºÕý£¨+£©¡¢¸º£¨££©¡¢¼Ó1£¨++£©ºÍ¼õ1£¨£££ ......
import java.util.*;
import java.text.*;
/**
* a <code> DateTime </code> ¶¨ÒåÁËÈÕÆÚʱ¼äµÄһЩ±ã½ÝµÄ¸ñʽ»¯²Ù×÷
*
* @version 1.0
* @author markhuang
*/
public class DateTime {
/**
* ´æ´¢Ê±¼äºÍÈÕÆÚ£¬Ä¬Èϵ±Ç°Ê±¼äºÍÈÕÆÚ
*/
// private Calendar cale = Calendar.getInstance ......