Java Doc for RequestUtil.java in  » Web-Server » Rimfaxe-Web-Server » org » apache » catalina » util » 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 » Web Server » Rimfaxe Web Server » org.apache.catalina.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.catalina.util.RequestUtil

RequestUtil
final public class RequestUtil (Code)
General purpose request parsing and encoding utility methods.
author:
   Craig R. McClanahan
author:
   Tim Tye
version:
   $Revision: 1.19 $ $Date: 2002/02/21 22:51:55 $




Method Summary
public static  StringURLDecode(String str)
     Decode and return the specified URL-encoded String. When the byte array is converted to a string, the system default character encoding is used...
public static  StringURLDecode(String str, String enc)
     Decode and return the specified URL-encoded String.
public static  StringURLDecode(byte[] bytes)
     Decode and return the specified URL-encoded byte array.
public static  StringURLDecode(byte[] bytes, String enc)
     Decode and return the specified URL-encoded byte array.
public static  StringencodeCookie(Cookie cookie)
     Encode a cookie as per RFC 2109.
public static  Stringfilter(String message)
     Filter the specified message string for characters that are sensitive in HTML.
public static  Stringnormalize(String path)
     Normalize a relative URI path that may have relative values ("/./", "/../", and so on ) it it.
public static  StringparseCharacterEncoding(String contentType)
     Parse the character encoding from the specified content type header.
public static  Cookie[]parseCookieHeader(String header)
     Parse a cookie header into an array of cookies according to RFC 2109.
public static  voidparseParameters(Map map, String data, String encoding)
     Append request parameters from the specified String to the specified Map.
public static  voidparseParameters(Map map, byte[] data, String encoding)
     Append request parameters from the specified String to the specified Map.



Method Detail
URLDecode
public static String URLDecode(String str)(Code)
Decode and return the specified URL-encoded String. When the byte array is converted to a string, the system default character encoding is used... This may be different than some other servers.
Parameters:
  str - The url-encoded string
exception:
  IllegalArgumentException - if a '%' character is not followedby a valid 2-digit hexadecimal number



URLDecode
public static String URLDecode(String str, String enc)(Code)
Decode and return the specified URL-encoded String.
Parameters:
  str - The url-encoded string
Parameters:
  enc - The encoding to use; if null, the default encoding is used
exception:
  IllegalArgumentException - if a '%' character is not followedby a valid 2-digit hexadecimal number



URLDecode
public static String URLDecode(byte[] bytes)(Code)
Decode and return the specified URL-encoded byte array.
Parameters:
  bytes - The url-encoded byte array
exception:
  IllegalArgumentException - if a '%' character is not followedby a valid 2-digit hexadecimal number



URLDecode
public static String URLDecode(byte[] bytes, String enc)(Code)
Decode and return the specified URL-encoded byte array.
Parameters:
  bytes - The url-encoded byte array
Parameters:
  enc - The encoding to use; if null, the default encoding is used
exception:
  IllegalArgumentException - if a '%' character is not followedby a valid 2-digit hexadecimal number



encodeCookie
public static String encodeCookie(Cookie cookie)(Code)
Encode a cookie as per RFC 2109. The resulting string can be used as the value for a Set-Cookie header.
Parameters:
  cookie - The cookie to encode. A string following RFC 2109.



filter
public static String filter(String message)(Code)
Filter the specified message string for characters that are sensitive in HTML. This avoids potential attacks caused by including JavaScript codes in the request URL that is often reported in error messages.
Parameters:
  message - The message string to be filtered



normalize
public static String normalize(String path)(Code)
Normalize a relative URI path that may have relative values ("/./", "/../", and so on ) it it. WARNING - This method is useful only for normalizing application-generated paths. It does not try to perform security checks for malicious input.
Parameters:
  path - Relative path to be normalized



parseCharacterEncoding
public static String parseCharacterEncoding(String contentType)(Code)
Parse the character encoding from the specified content type header. If the content type is null, or there is no explicit character encoding, null is returned.
Parameters:
  contentType - a content type header



parseCookieHeader
public static Cookie[] parseCookieHeader(String header)(Code)
Parse a cookie header into an array of cookies according to RFC 2109.
Parameters:
  header - Value of an HTTP "Cookie" header



parseParameters
public static void parseParameters(Map map, String data, String encoding) throws UnsupportedEncodingException(Code)
Append request parameters from the specified String to the specified Map. It is presumed that the specified Map is not accessed from any other thread, so no synchronization is performed.

IMPLEMENTATION NOTE: URL decoding is performed individually on the parsed name and value elements, rather than on the entire query string ahead of time, to properly deal with the case where the name or value includes an encoded "=" or "&" character that would otherwise be interpreted as a delimiter.
Parameters:
  map - Map that accumulates the resulting parameters
Parameters:
  data - Input string containing request parameters
Parameters:
  urlParameters - true if we're parsing parameters on the URL
exception:
  IllegalArgumentException - if the data is malformed




parseParameters
public static void parseParameters(Map map, byte[] data, String encoding) throws UnsupportedEncodingException(Code)
Append request parameters from the specified String to the specified Map. It is presumed that the specified Map is not accessed from any other thread, so no synchronization is performed.

IMPLEMENTATION NOTE: URL decoding is performed individually on the parsed name and value elements, rather than on the entire query string ahead of time, to properly deal with the case where the name or value includes an encoded "=" or "&" character that would otherwise be interpreted as a delimiter. NOTE: byte array data is modified by this method. Caller beware.
Parameters:
  map - Map that accumulates the resulting parameters
Parameters:
  data - Input string containing request parameters
Parameters:
  encoding - Encoding to use for converting hex
exception:
  UnsupportedEncodingException - if the data is malformed




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.