Java Doc for CosMultipartResolver.java in  » J2EE » spring-framework-2.0.6 » org » springframework » web » multipart » cos » 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 » J2EE » spring framework 2.0.6 » org.springframework.web.multipart.cos 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.web.multipart.cos.CosMultipartResolver

CosMultipartResolver
public class CosMultipartResolver implements MultipartResolver,ServletContextAware(Code)
MultipartResolver implementation for Jason Hunter's COS (com.oreilly.servlet). Works with a COS MultipartRequest underneath.

Provides "maxUploadSize" and "defaultEncoding" settings as bean properties; see respective MultipartRequest constructor parameters for details. Default maximum file size is unlimited; fallback encoding is the platform's default.
author:
   Juergen Hoeller
since:
   06.10.2003
See Also:   CosMultipartHttpServletRequest
See Also:   com.oreilly.servlet.MultipartRequest



Field Summary
final public static  StringMULTIPART_CONTENT_TYPE
     Constant identifier for the mulipart content type : 'multipart/form-data'.
final protected  Loglogger
    

Constructor Summary
public  CosMultipartResolver()
     Constructor for use as bean.
public  CosMultipartResolver(ServletContext servletContext)
     Constructor for standalone usage.

Method Summary
public  voidcleanupMultipart(MultipartHttpServletRequest request)
    
protected  StringdetermineEncoding(HttpServletRequest request)
     Determine the encoding for the given request.
protected  StringgetDefaultEncoding()
     Return the default character encoding to use for parsing requests.
protected  intgetMaxUploadSize()
     Return the maximum allowed size (in bytes) before uploads are refused.
protected  FilegetUploadTempDir()
     Return the temporary directory where uploaded files get stored.
public  booleanisMultipart(HttpServletRequest request)
    
protected  MultipartRequestnewMultipartRequest(HttpServletRequest request)
     Create a com.oreilly.servlet.MultipartRequest for the given HTTP request. Can be overridden to use a custom subclass, e.g.
public  MultipartHttpServletRequestresolveMultipart(HttpServletRequest request)
    
public  voidsetDefaultEncoding(String defaultEncoding)
     Set the default character encoding to use for parsing requests, to be applied to headers of individual parts and to form fields. Default is ISO-8859-1, according to the Servlet spec.

If the request specifies a character encoding itself, the request encoding will override this setting.

public  voidsetMaxUploadSize(int maxUploadSize)
     Set the maximum allowed size (in bytes) before uploads are refused.
public  voidsetServletContext(ServletContext servletContext)
    
public  voidsetUploadTempDir(Resource uploadTempDir)
     Set the temporary directory where uploaded files get stored.

Field Detail
MULTIPART_CONTENT_TYPE
final public static String MULTIPART_CONTENT_TYPE(Code)
Constant identifier for the mulipart content type : 'multipart/form-data'.



logger
final protected Log logger(Code)
Logger available to subclasses




Constructor Detail
CosMultipartResolver
public CosMultipartResolver()(Code)
Constructor for use as bean. Determines the servlet container's temporary directory via the ServletContext passed in as through the ServletContextAware interface (typically by a WebApplicationContext).
See Also:   CosMultipartResolver.setServletContext
See Also:   org.springframework.web.context.ServletContextAware
See Also:   org.springframework.web.context.WebApplicationContext



CosMultipartResolver
public CosMultipartResolver(ServletContext servletContext)(Code)
Constructor for standalone usage. Determines the servlet container's temporary directory via the given ServletContext.
Parameters:
  servletContext - the ServletContext to use (must not be null)
throws:
  IllegalArgumentException - if the supplied ServletContext is null




Method Detail
cleanupMultipart
public void cleanupMultipart(MultipartHttpServletRequest request)(Code)



determineEncoding
protected String determineEncoding(HttpServletRequest request)(Code)
Determine the encoding for the given request. Can be overridden in subclasses.

The default implementation checks the request encoding, falling back to the default encoding specified for this resolver.
Parameters:
  request - current HTTP request the encoding for the request (never null)
See Also:   javax.servlet.ServletRequest.getCharacterEncoding
See Also:   CosMultipartResolver.setDefaultEncoding




getDefaultEncoding
protected String getDefaultEncoding()(Code)
Return the default character encoding to use for parsing requests.



getMaxUploadSize
protected int getMaxUploadSize()(Code)
Return the maximum allowed size (in bytes) before uploads are refused.



getUploadTempDir
protected File getUploadTempDir()(Code)
Return the temporary directory where uploaded files get stored.



isMultipart
public boolean isMultipart(HttpServletRequest request)(Code)



newMultipartRequest
protected MultipartRequest newMultipartRequest(HttpServletRequest request) throws IOException(Code)
Create a com.oreilly.servlet.MultipartRequest for the given HTTP request. Can be overridden to use a custom subclass, e.g. for testing purposes.
Parameters:
  request - current HTTP request the new MultipartRequest
throws:
  IOException - if thrown by the MultipartRequest constructor



resolveMultipart
public MultipartHttpServletRequest resolveMultipart(HttpServletRequest request) throws MultipartException(Code)



setDefaultEncoding
public void setDefaultEncoding(String defaultEncoding)(Code)
Set the default character encoding to use for parsing requests, to be applied to headers of individual parts and to form fields. Default is ISO-8859-1, according to the Servlet spec.

If the request specifies a character encoding itself, the request encoding will override this setting. This also allows for generically overriding the character encoding in a filter that invokes the ServletRequest.setCharacterEncoding method.
Parameters:
  defaultEncoding - the character encoding to use
See Also:   CosMultipartResolver.determineEncoding
See Also:   javax.servlet.ServletRequest.getCharacterEncoding
See Also:   javax.servlet.ServletRequest.setCharacterEncoding
See Also:   WebUtils.DEFAULT_CHARACTER_ENCODING




setMaxUploadSize
public void setMaxUploadSize(int maxUploadSize)(Code)
Set the maximum allowed size (in bytes) before uploads are refused. -1 indicates no limit (the default).
Parameters:
  maxUploadSize - the maximum file size allowed



setServletContext
public void setServletContext(ServletContext servletContext)(Code)



setUploadTempDir
public void setUploadTempDir(Resource uploadTempDir) throws IOException(Code)
Set the temporary directory where uploaded files get stored. Default is the servlet container's temporary directory for the web application.
See Also:   org.springframework.web.util.WebUtils.TEMP_DIR_CONTEXT_ATTRIBUTE



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.