Comparison of various implementation methods uploaded by documents

xiaoxiao2021-03-06  44

There are two forms, databases, and files. Therefore, the file upload is almost all application development. It is currently also a third-party component in the Java field. Common is: jspsmartupload, common_fileupload. 1, jspsmartupload. JSPSMART's official website is www.jspsmart.com. 9CBS contains an article about it http://dev.9cbs.net/develop/article/18/18987.shtm. http://www.9cbs.com. Cn / program / 3027.htm written in detail. It can be used as a reference. Second, common_fileupload he is a subpredal for the Common project under Jakarta. His main classes are as follows:

The tree structure diagram is as follows:

When we upload files, mainly used is DiskFiluUpload FileItems classes and interfaces in addition to inheriting FileUploadBase DiskFileUpload class method, but also joined the getFileItemFactory, setFileItemFactorygetRepositoryPath, setRepositoryPath, getSizeThresholdsetSizeThreshold, parseRequest method the following seven simple introduction:.. SetSizeThreshold (int SiZETHRESHOLD:

Setting Once the file size exceeds getsizeThreshold (), the data is stored on the hard disk directory setRepositoryPath (java.lang.string repositorypath):

RepositoryPath Specifies the buffer directory. Parsequest (Javax.Servlet.http.httpservletRequest Req, Int SizeTHold, long size): Resolving HttpServletRequest Returns a FileItem list. SetsizeMax (int size):

Setting Allow User Upload File Size, Unit: The Implementation of Byte FileItem interface is defaultfileItem. Common methods are: isformfield: Judging whether it is a normal text domain getName: obtain files on the client machine (including path)

GetSize: Gets the file size getString: Save Write (java.io.file file) in memory in the form: Write the disk is a classic example:

转载请注明原文地址:https://www.9cbs.com/read-47602.html

New Post(0)