java³£ÓÃÀà blobFileBean
package com.whlongyi.sys.blob.bean;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import javax.faces.context.FacesContext;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.myfaces.custom.fileupload.UploadedFile;
import com.whlongyi.common.util.FacesUtils;
import com.whlongyi.sys.blob.bo.BlobFile;
import com.whlongyi.sys.blob.service.BlobFileService;
public class BlobFileBean {
public final static String uploadPath="uploadFile";
private BlobFileService blobFileService;
public BlobFileService getBlobFileService() {
return blobFileService;
}
public void setBlobFileService(BlobFileService blobFileService) {
this.blobFileService = blobFileService;
}
public String downLoadFile()
{
String blobId=FacesUtils.getRequestParameter("blobFileID");
BlobFile blobVO=blobFileService.getBlobFile(Integer.parseInt(blobId));
HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
ServletContext servletContext=FacesUtils.getServletContext();
InputStream s = new java.io.ByteArrayInputStream(blobVO.getFileContent());
BufferedInputStream bis = new BufferedInputStream(s);
String realName=blobVO.getName();
String extendName=null;
try {
 
Ïà¹ØÎĵµ£º
ÏßÐÔ±í£¬Á´±í£¬¼¯ºÏ£¬¹þÏ£±íÊdz£ÓõÄÊý¾Ý½á¹¹£¬ÔÚ½øÐÐJava¿ª·¢Ê±£¬JDKÒѾΪÎÒÃÇÌṩÁËһϵÁÐÏàÓ¦µÄÀàÀ´ÊµÏÖ»ù±¾µÄÊý¾Ý½á¹¹¡£ÕâЩÀà¾ùÔÚjava.util°üÖС£
Collection
©ÀList
©¦©ÀLinkedList
©¦©ÀArrayList
©¦©¸Vector
©¦¡¡©¸Stack
©¸Set
Map
©ÀHashtable
©ÀHashMap
©¸WeakHashMap
Ö÷Òª·ÖΪÁ½¸ö·ÖÖ§£º
Collectio ......
1¡¢½«org.vssplugin_1.6.2Îļþ¼Ð¼°Îļþ¼ÐÖеÄÄÚÈÝcopyµ½...\Genuitec\Common\pluginsĿ¼Ï¡£
2¡¢ÔÚĿ¼...\Genuitec\MyEclipse 7.0\configuration\org.eclipse.equinox.simpleconfigurator µÄÎļþbundles.info×îºó¼ÓÒ»ÐÐ
org.vssplugin,1.6.2,file:plugins\org.vssplugin_1.6.2\,4,false
3¡¢ÖØÆôMyEclipse7.0¼´¿É  ......
ͨ³£Çé¿öÏ£¬ÎÒÃÇÔÚдһ¸öÀàʱ£¬Ò»°ã»á¸³ÓèËüÒ»¸ö»ò¼¸¸öpublicµÄ¹¹Ô캯Êý£¬ÈÃÍⲿ³ÌÐòÄܹ»´´½¨¶ÔÏó.¡¡È»¶ø£¬ÔÚeffective¡¡java ÖУ¬´ÓÁíÒ»¸ö½Ç¶È¸æ½ëÎÒÃÇÔÚʹÓÃpublicµÄ¹¹Ô캯ÊýÇ°£¬ÏÈ¿¼ÂÇÓÃpublic µÄ¾²Ì¬º¯ÊýÀ´´´½¨¶ÔÏó.¡¡
ÆäÓŵãÈçÏ£º
£±.¡¡Ò»¸ö¾²Ì¬µÄ¹¤³§º¯Êý£¬¿ÉÒÔÈ¡²»Í¬µÄÃû×Ö.¡¡¶ø¹¹Ô캯ÊýµÄÃû×ÖÖ»ÄÜÓëÀàͬÃû.¡¡
......
JavaµÄºËÐÄAPIÊǷdz£ÅÓ´óµÄ,Õâ¸ø¿ª·¢ÕßÀ´Ëµ´øÀ´Á˺ܴóµÄ·½±ã£¬¾³£ÈËÓÐÆÀÂÛ,javaÈóÌÐòÔ±±äɵ¡£
µ«ÊÇһЩÄÚÈÝÎÒÈÏΪÊDZØÐëÕÆÎյģ¬·ñÔò²»¿ÉÒÔÊìÁ·ÔËÓÃjava£¬Ò²²»»áʹÓþͺÜÄÑ°ìÁË¡£
1¡¢java.lang°üϵÄ80£¥ÒÔÉϵÄÀàµÄ¹¦ÄܵÄÁé»îÔËÓá£
2¡¢java.util°üϵÄ80£¥ÒÔÉϵÄÀàµÄÁé»îÔËÓã¬ÌرðÊǼ¯ºÏÀàÌåϵ¡¢Õý¹æ±í´ïʽ¡¢Ê±¼ä¡ ......