java¶ÁȡͼƬ
Java code:
import java.awt.image.*;
import java.awt.*;
import java.io.*;
import javax.imageio.*;
public class ImageByte {
/**
* ת»»ImageÊý¾ÝΪbyteÊý×é
*
* @param image
* Image¶ÔÏó
* @param format
* image¸ñʽ×Ö·û´®.Èç"jpeg","png"
* @return byteÊý×é
*/
public static byte[] imageToBytes(BufferedImage image, String format) {
BufferedImage bImage = new BufferedImage(image.getWidth(null), image
.getHeight(null), BufferedImage.TYPE_INT_ARGB);
Graphics bg = bImage.getGraphics();
bg.drawImage(image, 0, 0, null);
bg.dispose();
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
ImageIO.write(bImage, format, out);
} catch (IOException e) {
e.printStackTrace();
// Log.log(null,"imageToBytes(): " e);
}
return out.toByteArray();
}
/**
* ת»»byteÊý×éΪImage
*
* @param bytes
* ImageµÄbytesÊý¾ÝÊý×é
* @param filename
* ΪҪÉú³ÉеÄÎļþÃû
* @return boolean
*/
public static boolean ByteToImage(byte[] b, String filename) {
boolean bl = false;
File binaryFile = new File("e:\\test\\" + filename + ".
Ïà¹ØÎÊ´ð£º
Position Title: Java-J2EE Developer
Desired Start Date: Immediately
Location: China
Number of Positions: 1
Description of Duties:
Nonillion Limited ......
СµÜ×î½üѧϰͼÐνçÃæ±à³Ì£¬ÓÉAWTתµ½Swing£¬ÔÚ¿´Ò»¸ö³ÌÐòʱ¸Ðµ½ÒÉ»ó¡£Ò»¸ö³ÌÐòÔØÈëµÄ°üÖÐͬʱ°üº¬
Java code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
¿ÉÊÇÎÒ¿´µ ......
¸÷λ´óÏÀ£¬ÎÒÕýÔÚѧϰstruts2£¬ÎÒÏëÔÚweb.xmlÖÐÅäÖÃÒ»¸ö³£Á¿£¬È»ºóÔÚjavaÀàÖжÁÈ¡£¬ÈçºÎ²ÅÄÜ×öµ½°¡£¿ ¼±¼±¼±¼±£¡£¡
Java code:
Enumeration params = null;
params = request.getParameterNames(); ......
ÏÂÁУ¨B£©ÊǸ߼¶Ê¼þ
A.componentevent B.itemevent
C.windowevent D.mouseevent
ÕâÌâÇëÎʸ߼¶Ê ......
ÎÒÏëʹÓÃLuceneµÄ´úÂ룬·¢ÏÖÒªimportÒ»ÅúÎļþ£º
============
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
¡¡¡¡¡¡
===== ......