Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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 {
        


Ïà¹ØÎĵµ£º

Java Ïß³Ì

Java.lang.Thread
Ïß³Ì---³ÌÐòµÄ²»Í¬Ö´Ðз¾¶
Ö÷Ïß³Ìmain·½·¨ ·ÖÖ§Ïß³Ì
 
Ïß³ÌµÄÆô¶¯·¢·¨£º
Á½¸ö
1.
ʵÏÖRunnalble½Ó¿ÚʵÏÖRUN
New Thread(new Runnable).start
2.¼Ì³ÐThreadʵÏÖRUN
New Thread().start
Ô­Àí£º
½¨ÒéʹÓõÚÒ»ÖÖ·½·¨
×¢ÒâÇø·Ö·½·¨µ÷ÓÃrunÓëÏß³ÌÆô¶¯µÄ²»Í¬start
  ......

Java¶ÁÈ¡PropertiesÎļþµÄÁùÖÖ·½·¨

Java¶ÁÈ¡PropertiesÎļþµÄÁùÖÖ·½·¨
Java¶ÁÈ¡propertiesÎļþ
ʹÓÃJ2SE API¶ÁÈ¡PropertiesÎļþµÄÁùÖÖ·½·¨
1¡£Ê¹ÓÃjava.util.PropertiesÀàµÄload()·½·¨
ʾÀý£º InputStream in = lnew BufferedInputStream(new FileInputStream(name));
Properties p = new Properties();
p.load(in);
2¡£Ê¹ÓÃjava.util.ResourceBundleÀ ......

JAVAСÀý×Ó½âÎöË㷨ЧÂÊ

½ñÌì±¾À´ÏëÊìϤһÏÂJ2SEµÄÄÚÈÝ£¬²»ÏëÔÚ±àд¹ý³ÌÖÐͻȻ¿¼Âǵ½Ò»¸öÎÊÌ⣬JAVAËã·¨µÄЧÂÊ£¬´ó¼ÒÏÈ¿´ÎÒ×Ô¼ºÐ´µÄÒ»¸öСÀý×Ó£º
public class NumSort {
 public static void mian (String args[]) {
  int a[] = new int[args.length];
  for (int i=0;i<args.length;i++) {
    ......

javaµÄ»ù±¾Ë¼Ïë

JavaÖеķ½·¨µ÷ÓÃÖвÎÊý´«µÝÓÐÁ½ÖÖ£¬Ò»¸öÊǶÔÓÚ²ÎÊýÊÇ»ù±¾ÀàÐ͵ÄʹÓõÄÊÇÖµ´«µÝ£¨Ö±½Ó´«²ÎÊýµÄÖµ£©£¬ÁíÒ»¸öÊÇÒýÓô«µÝ£¬ËüÊÇÓÃÓÚ²ÎÊýÊÇÀàµÄ¶ÔÏó£¬Ëü´«µÝµÄÊÇÕâ¸ö¶ÔÏóµÄÒýÓá£
ÃæÏò¶ÔÏóµÄ˼Ïëanything is Object£¨ÍòÎï½Ô¶ÔÏ󣩳éÏ󣬴ӶԾßÌåµÄ¶ÔÏóÖгéÈ¡ÓÐÓÃÐÅÏ¢¡£¶ÔÏóÓÐÆä¹ÌÓÐÊôÐÔ£¬¶ÔÏóµÄ·½·¨£¬¼´¶ÔÏóµÄÐÐΪ£¨¶ÔÏóÄÜ×öʲ ......

JavaµÄÄÚ´æÐ¹Â©

JavaµÄÄÚ´æÐ¹Â©
===========================================================
×÷Õß: shwenwen(http://shwenwen.itpub.net)
·¢±íÓÚ: 2009.06.04 10:38
·ÖÀà: java¿ª·¢¼¼Êõ
³ö´¦: http://shwenwen.itpub.net/post/34911/485404
---------------------------------------------------------------
²»¹ÜÓÃjava C++ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ