Source Code Cross Referenced for ServletMultipartRequest.java in  » ERP-CRM-Financial » SourceTap-CRM » http » utils » multipartrequest » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » SourceTap CRM » http.utils.multipartrequest 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * 
003:         * Copyright (c) 2004 SourceTap - www.sourcetap.com
004:         *
005:         *  The contents of this file are subject to the SourceTap Public License 
006:         * ("License"); You may not use this file except in compliance with the 
007:         * License. You may obtain a copy of the License at http://www.sourcetap.com/license.htm
008:         * Software distributed under the License is distributed on an  "AS IS"  basis,
009:         * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
010:         * the specific language governing rights and limitations under the License.
011:         *
012:         * The above copyright notice and this permission notice shall be included
013:         * in all copies or substantial portions of the Software.
014:         *
015:         */
016:
017:        package http.utils.multipartrequest;
018:
019:        import java.io.IOException;
020:
021:        import javax.servlet.http.HttpServletRequest;
022:
023:        /**
024:         Wrapper for MultipartRequest
025:         */
026:        public class ServletMultipartRequest extends MultipartRequest {
027:            /**
028:             * Constructor.
029:             *
030:             * @param request                                The HttpServletRequest will be used to initialise the MultipartRequest super class.
031:             * @param strSaveDirectory                The temporary directory to save the file from where they can then be moved to wherever by the
032:             *                                                                 calling process.  <b>If you specify <u>null</u> for this parameter, then any files uploaded
033:             *                                                                will be silently ignored.</B>
034:             *
035:             * @exception IllegalArgumentException         If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
036:             * @exception IOException                                If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
037:             *
038:             * @see MultipartRequest#MAX_READ_BYTES
039:             */
040:            public ServletMultipartRequest(HttpServletRequest request,
041:                    String strSaveDirectory) throws IllegalArgumentException,
042:                    IOException {
043:                super (null, request.getContentType(), request
044:                        .getContentLength(), request.getInputStream(),
045:                        strSaveDirectory, null, MultipartRequest.MAX_READ_BYTES);
046:            }
047:
048:            /**
049:             * Constructor.
050:             *
051:             * @param request                                The HttpServletRequest will be used to initialise the MultipartRequest super class.
052:             * @param strSaveDirectory                The temporary directory to save the file from where they can then be moved to wherever by the
053:             *                                                                 calling process.  <b>If you specify <u>null</u> for this parameter, then any files uploaded
054:             *                                                                will be silently ignored.</B>
055:             * @param strFilePrefix                        A prefix that will be prepended to the saved file
056:             *
057:             * @exception IllegalArgumentException         If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
058:             * @exception IOException                                If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
059:             *
060:             * @see MultipartRequest#MAX_READ_BYTES
061:             */
062:            public ServletMultipartRequest(HttpServletRequest request,
063:                    String strSaveDirectory, String strFilePrefix)
064:                    throws IllegalArgumentException, IOException {
065:                super (null, request.getContentType(), request
066:                        .getContentLength(), request.getInputStream(),
067:                        strSaveDirectory, strFilePrefix,
068:                        MultipartRequest.MAX_READ_BYTES);
069:            }
070:
071:            /**
072:             * Constructor.
073:             *
074:             * @param request                                The HttpServletRequest will be used to initialise the MultipartRequest super class.
075:             * @param strSaveDirectory                The temporary directory to save the file from where they can then be moved to wherever by the
076:             *                                                                 calling process.  <b>If you specify <u>null</u> for this parameter, then any files uploaded
077:             *                                                                will be silently ignored.</B>
078:             * @param intMaxReadBytes                Overrides the MAX_BYTES_READ value, to allow arbitrarily long files.
079:             *
080:             * @exception IllegalArgumentException         If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
081:             * @exception IOException                                If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
082:             *
083:             * @see MultipartRequest#MAX_READ_BYTES
084:             */
085:            public ServletMultipartRequest(HttpServletRequest request,
086:                    String strSaveDirectory, int intMaxReadBytes)
087:                    throws IllegalArgumentException, IOException {
088:                super (null, request.getContentType(), request
089:                        .getContentLength(), request.getInputStream(),
090:                        strSaveDirectory, null, intMaxReadBytes);
091:            }
092:
093:            /**
094:             * Constructor.
095:             *
096:             * @param request                                The HttpServletRequest will be used to initialise the MultipartRequest super class.
097:             * @param strSaveDirectory                The temporary directory to save the file from where they can then be moved to wherever by the
098:             *                                                                 calling process.  <b>If you specify <u>null</u> for this parameter, then any files uploaded
099:             *                                                                will be silently ignored.</B>
100:             * @param strFilePrefix                        A prefix that will be prepended to the saved file
101:             * @param intMaxReadBytes                Overrides the MAX_BYTES_READ value, to allow arbitrarily long files.
102:             *
103:             * @exception IllegalArgumentException         If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
104:             * @exception IOException                                If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
105:             *
106:             * @see MultipartRequest#MAX_READ_BYTES
107:             */
108:            public ServletMultipartRequest(HttpServletRequest request,
109:                    String strSaveDirectory, String strFilePrefix,
110:                    int intMaxReadBytes) throws IllegalArgumentException,
111:                    IOException {
112:                super (null, request.getContentType(), request
113:                        .getContentLength(), request.getInputStream(),
114:                        strSaveDirectory, null, intMaxReadBytes);
115:            }
116:
117:            /**
118:             * Constructor - load into memory constructor
119:             *
120:             * @param request                                The HttpServletRequest will be used to initialise the MultipartRequest super class.
121:             * @param intMaxReadBytes                Overrides the MAX_BYTES_READ value, to allow arbitrarily long files.
122:             *
123:             * @exception IllegalArgumentException         If the request.getContentType() does not contain a Content-Type of "multipart/form-data" or the boundary is not found.
124:             * @exception IOException                                If the request.getContentLength() is higher than MAX_READ_BYTES or strSaveDirectory is invalid or cannot be written to.
125:             *
126:             * @see MultipartRequest#MAX_READ_BYTES
127:             */
128:            public ServletMultipartRequest(HttpServletRequest request,
129:                    int intMaxReadBytes) throws IllegalArgumentException,
130:                    IOException {
131:                super(null, request.getContentType(), request
132:                        .getContentLength(), request.getInputStream(),
133:                        intMaxReadBytes);
134:            }
135:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.