Java Doc for URIUtil.java in  » Net » Apache-common-HttpClient » org » apache » commons » httpclient » 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 » Net » Apache common HttpClient » org.apache.commons.httpclient.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.httpclient.util.URIUtil

URIUtil
public class URIUtil (Code)
The URI escape and character encoding and decoding utility. It's compatible with org.apache.commons.httpclient.HttpURL rather than org.apache.commons.httpclient.URI .
author:
   Sung-Gu
version:
   $Revision: 507321 $ $Date: 2002/03/14 15:14:01

Inner Class :protected static class Coder extends URI

Field Summary
final protected static  BitSetempty
    


Method Summary
public static  Stringdecode(String escaped)
     Unescape and decode a given string regarded as an escaped string with the default protocol charset.
public static  Stringdecode(String escaped, String charset)
     Unescape and decode a given string regarded as an escaped string.
public static  Stringencode(String unescaped, BitSet allowed)
     Escape and encode a given string with allowed characters not to be escaped and the default protocol charset.
public static  Stringencode(String unescaped, BitSet allowed, String charset)
     Escape and encode a given string with allowed characters not to be escaped and a given charset.
public static  StringencodeAll(String unescaped)
     Get the all escaped and encoded string with the default protocl charset.
public static  StringencodeAll(String unescaped, String charset)
     Get the all escaped and encoded string with a given charset.
public static  StringencodePath(String unescaped)
     Escape and encode a string regarded as the path component of an URI with the default protocol charset.
public static  StringencodePath(String unescaped, String charset)
     Escape and encode a string regarded as the path component of an URI with a given charset.
public static  StringencodePathQuery(String unescaped)
     Escape and encode a string regarded as the path and query components of an URI with the default protocol charset.
public static  StringencodePathQuery(String unescaped, String charset)
     Escape and encode a string regarded as the path and query components of an URI with a given charset.
public static  StringencodeQuery(String unescaped)
     Escape and encode a string regarded as the query component of an URI with the default protocol charset.
public static  StringencodeQuery(String unescaped, String charset)
     Escape and encode a string regarded as the query component of an URI with a given charset.
public static  StringencodeWithinAuthority(String unescaped)
     Escape and encode a string regarded as within the authority component of an URI with the default protocol charset.
public static  StringencodeWithinAuthority(String unescaped, String charset)
     Escape and encode a string regarded as within the authority component of an URI with a given charset.
public static  StringencodeWithinPath(String unescaped)
     Escape and encode a string regarded as within the path component of an URI with the default protocol charset. The path may consist of a sequence of path segments separated by a single slash "/" character.
public static  StringencodeWithinPath(String unescaped, String charset)
     Escape and encode a string regarded as within the path component of an URI with a given charset. The path may consist of a sequence of path segments separated by a single slash "/" character.
public static  StringencodeWithinQuery(String unescaped)
     Escape and encode a string regarded as within the query component of an URI with the default protocol charset. When a query comprise the name and value pairs, it is used in order to encode each name and value string.
public static  StringencodeWithinQuery(String unescaped, String charset)
     Escape and encode a string regarded as within the query component of an URI with a given charset. When a query comprise the name and value pairs, it is used in order to encode each name and value string.
public static  StringgetFromPath(String uri)
     Get the path of an URI and its rest part.
public static  StringgetName(String uri)
     Get the basename of an URI.
public static  StringgetPath(String uri)
     Get the path of an URI.
public static  StringgetPathQuery(String uri)
     Get the path and query of an URI.
public static  StringgetQuery(String uri)
     Get the query of an URI.

Field Detail
empty
final protected static BitSet empty(Code)





Method Detail
decode
public static String decode(String escaped) throws URIException(Code)
Unescape and decode a given string regarded as an escaped string with the default protocol charset.
Parameters:
  escaped - a string the unescaped string
throws:
  URIException - if the string cannot be decoded (invalid)
See Also:   URI.getDefaultProtocolCharset



decode
public static String decode(String escaped, String charset) throws URIException(Code)
Unescape and decode a given string regarded as an escaped string.
Parameters:
  escaped - a string
Parameters:
  charset - the charset the unescaped string
throws:
  URIException - if the charset is not supported
See Also:   Coder.decode



encode
public static String encode(String unescaped, BitSet allowed) throws URIException(Code)
Escape and encode a given string with allowed characters not to be escaped and the default protocol charset.
Parameters:
  unescaped - a string
Parameters:
  allowed - allowed characters not to be escaped the escaped string
throws:
  URIException - if the default protocol charset is not supported
See Also:   URI.getDefaultProtocolCharset



encode
public static String encode(String unescaped, BitSet allowed, String charset) throws URIException(Code)
Escape and encode a given string with allowed characters not to be escaped and a given charset.
Parameters:
  unescaped - a string
Parameters:
  allowed - allowed characters not to be escaped
Parameters:
  charset - the charset the escaped string



encodeAll
public static String encodeAll(String unescaped) throws URIException(Code)
Get the all escaped and encoded string with the default protocl charset. It's the same function to use encode(String unescaped, Bitset empty, URI.getDefaultProtocolCharset()).
Parameters:
  unescaped - an unescaped string the escaped string
throws:
  URIException - if the default protocol charset is not supported
See Also:   URI.getDefaultProtocolCharset
See Also:   URIUtil.encode



encodeAll
public static String encodeAll(String unescaped, String charset) throws URIException(Code)
Get the all escaped and encoded string with a given charset. It's the same function to use encode(String unescaped, Bitset empty, String charset).
Parameters:
  unescaped - an unescaped string
Parameters:
  charset - the charset the escaped string
throws:
  URIException - if the charset is not supported
See Also:   URIUtil.encode



encodePath
public static String encodePath(String unescaped) throws URIException(Code)
Escape and encode a string regarded as the path component of an URI with the default protocol charset.
Parameters:
  unescaped - an unescaped string the escaped string
throws:
  URIException - if the default protocol charset is not supported
See Also:   URI.getDefaultProtocolCharset
See Also:   URIUtil.encode



encodePath
public static String encodePath(String unescaped, String charset) throws URIException(Code)
Escape and encode a string regarded as the path component of an URI with a given charset.
Parameters:
  unescaped - an unescaped string
Parameters:
  charset - the charset the escaped string
throws:
  URIException - if the charset is not supported
See Also:   URIUtil.encode



encodePathQuery
public static String encodePathQuery(String unescaped) throws URIException(Code)
Escape and encode a string regarded as the path and query components of an URI with the default protocol charset.
Parameters:
  unescaped - an unescaped string the escaped string
throws:
  URIException - if the default protocol charset is not supported
See Also:   URI.getDefaultProtocolCharset
See Also:   URIUtil.encode



encodePathQuery
public static String encodePathQuery(String unescaped, String charset) throws URIException(Code)
Escape and encode a string regarded as the path and query components of an URI with a given charset.
Parameters:
  unescaped - an unescaped string
Parameters:
  charset - the charset the escaped string
throws:
  URIException - if the charset is not supported
See Also:   URIUtil.encode



encodeQuery
public static String encodeQuery(String unescaped) throws URIException(Code)
Escape and encode a string regarded as the query component of an URI with the default protocol charset. When a query string is not misunderstood the reserved special characters ("&", "=", "+", ",", and "$") within a query component, this method is recommended to use in encoding the whole query.
Parameters:
  unescaped - an unescaped string the escaped string
throws:
  URIException - if the default protocol charset is not supported
See Also:   URI.getDefaultProtocolCharset
See Also:   URIUtil.encode



encodeQuery
public static String encodeQuery(String unescaped, String charset) throws URIException(Code)
Escape and encode a string regarded as the query component of an URI with a given charset. When a query string is not misunderstood the reserved special characters ("&", "=", "+", ",", and "$") within a query component, this method is recommended to use in encoding the whole query.
Parameters:
  unescaped - an unescaped string
Parameters:
  charset - the charset the escaped string
throws:
  URIException - if the charset is not supported
See Also:   URIUtil.encode



encodeWithinAuthority
public static String encodeWithinAuthority(String unescaped) throws URIException(Code)
Escape and encode a string regarded as within the authority component of an URI with the default protocol charset. Within the authority component, the characters ";", ":", "@", "?", and "/" are reserved.
Parameters:
  unescaped - an unescaped string the escaped string
throws:
  URIException - if the default protocol charset is not supported
See Also:   URI.getDefaultProtocolCharset
See Also:   URIUtil.encode



encodeWithinAuthority
public static String encodeWithinAuthority(String unescaped, String charset) throws URIException(Code)
Escape and encode a string regarded as within the authority component of an URI with a given charset. Within the authority component, the characters ";", ":", "@", "?", and "/" are reserved.
Parameters:
  unescaped - an unescaped string
Parameters:
  charset - the charset the escaped string
throws:
  URIException - if the charset is not supported
See Also:   URIUtil.encode



encodeWithinPath
public static String encodeWithinPath(String unescaped) throws URIException(Code)
Escape and encode a string regarded as within the path component of an URI with the default protocol charset. The path may consist of a sequence of path segments separated by a single slash "/" character. Within a path segment, the characters "/", ";", "=", and "?" are reserved.
Parameters:
  unescaped - an unescaped string the escaped string
throws:
  URIException - if the default protocol charset is not supported
See Also:   URI.getDefaultProtocolCharset
See Also:   URIUtil.encode



encodeWithinPath
public static String encodeWithinPath(String unescaped, String charset) throws URIException(Code)
Escape and encode a string regarded as within the path component of an URI with a given charset. The path may consist of a sequence of path segments separated by a single slash "/" character. Within a path segment, the characters "/", ";", "=", and "?" are reserved.
Parameters:
  unescaped - an unescaped string
Parameters:
  charset - the charset the escaped string
throws:
  URIException - if the charset is not supported
See Also:   URIUtil.encode



encodeWithinQuery
public static String encodeWithinQuery(String unescaped) throws URIException(Code)
Escape and encode a string regarded as within the query component of an URI with the default protocol charset. When a query comprise the name and value pairs, it is used in order to encode each name and value string. The reserved special characters within a query component are being included in encoding the query.
Parameters:
  unescaped - an unescaped string the escaped string
throws:
  URIException - if the default protocol charset is not supported
See Also:   URI.getDefaultProtocolCharset
See Also:   URIUtil.encode



encodeWithinQuery
public static String encodeWithinQuery(String unescaped, String charset) throws URIException(Code)
Escape and encode a string regarded as within the query component of an URI with a given charset. When a query comprise the name and value pairs, it is used in order to encode each name and value string. The reserved special characters within a query component are being included in encoding the query.
Parameters:
  unescaped - an unescaped string
Parameters:
  charset - the charset the escaped string
throws:
  URIException - if the charset is not supported
See Also:   URIUtil.encode



getFromPath
public static String getFromPath(String uri)(Code)
Get the path of an URI and its rest part.
Parameters:
  uri - a string regarded an URI the string from the path part



getName
public static String getName(String uri)(Code)
Get the basename of an URI. It's possibly an empty string.
Parameters:
  uri - a string regarded an URI the basename string; an empty string if the path ends with slash



getPath
public static String getPath(String uri)(Code)
Get the path of an URI.
Parameters:
  uri - a string regarded an URI the path string



getPathQuery
public static String getPathQuery(String uri)(Code)
Get the path and query of an URI.
Parameters:
  uri - a string regarded an URI the path and query string



getQuery
public static String getQuery(String uri)(Code)
Get the query of an URI.
Parameters:
  uri - a string regarded an URI the query string; null if empty or undefined



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.