Java Doc for NetUtils.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cocoon.util.NetUtils

NetUtils
public class NetUtils (Code)
A collection of File, URL and filename utility methods
author:
   Stefano Mazzocchi
version:
   CVS $Id: NetUtils.java 433543 2006-08-22 06:22:54Z crossley $




Method Summary
public static  Stringabsolutize(String path, String resource)
     Absolutize a relative resource path on the given absolute base path.
public static  SourceParameterscreateParameters(Request request)
    
public static  Stringdecode(String s, String enc)
     Pass through to the java.net.URLDecoder .
public static  StringdecodePath(String path)
     Decode a path.

Interprets %XX (where XX is hexadecimal number) as UTF-8 encoded bytes.

The validity of the input path is not checked (i.e.

public static  Stringdeparameterize(String uri, Map parameters)
     Remove parameters from a uri. Resulting Map will have either String for single value attributes, or String arrays for multivalue attributes.
Parameters:
  uri - The uri path to deparameterize.
Parameters:
  parameters - The map that collects parameters.
public static  Stringencode(String s, String enc)
     Pass through to the java.net.URLEncoder .
public static  StringencodePath(String path)
     Encode a path as required by the URL specification ( RFC 1738).
public static  StringgetExtension(String uri)
    
public static  StringgetPath(String uri)
     Returns the path of the given resource.
public static  Stringnormalize(String uri)
     Normalize a uri containing ../ and ./ paths.
public static  Stringparameterize(String uri, Map parameters)
     Add parameters stored in the Map to the uri string.
public static  Stringrelativize(String path, String absoluteResource)
     Relativize an absolute resource on a given absolute path.
public static  StringremoveAuthorisation(String uri)
    



Method Detail
absolutize
public static String absolutize(String path, String resource)(Code)
Absolutize a relative resource path on the given absolute base path.
Parameters:
  path - The absolute base path
Parameters:
  resource - The relative resource path The absolutized resource path



createParameters
public static SourceParameters createParameters(Request request)(Code)
Create new SourceParameters with the same parameters as the current request



decode
public static String decode(String s, String enc) throws UnsupportedEncodingException(Code)
Pass through to the java.net.URLDecoder . If running under JDK < 1.4, default encoding will always be used.



decodePath
public static String decodePath(String path)(Code)
Decode a path.

Interprets %XX (where XX is hexadecimal number) as UTF-8 encoded bytes.

The validity of the input path is not checked (i.e. characters that were not encoded will not be reported as errors).

This method differs from URLDecoder.decode in that it always uses UTF-8 (while URLDecoder uses the platform default encoding, often ISO-8859-1), and doesn't translate + characters to spaces.
Parameters:
  path - the path to decode the decoded path




deparameterize
public static String deparameterize(String uri, Map parameters)(Code)
Remove parameters from a uri. Resulting Map will have either String for single value attributes, or String arrays for multivalue attributes.
Parameters:
  uri - The uri path to deparameterize.
Parameters:
  parameters - The map that collects parameters. The cleaned uri



encode
public static String encode(String s, String enc) throws UnsupportedEncodingException(Code)
Pass through to the java.net.URLEncoder . If running under JDK < 1.4, default encoding will always be used.



encodePath
public static String encodePath(String path)(Code)
Encode a path as required by the URL specification ( RFC 1738). This differs from java.net.URLEncoder.encode() which encodes according to the x-www-form-urlencoded MIME format.
Parameters:
  path - the path to encode the encoded path



getExtension
public static String getExtension(String uri)(Code)
Remove path and file information from a filename returning only its extension component
Parameters:
  uri - The filename The filename extension (with starting dot!) or null if filename extension is not found



getPath
public static String getPath(String uri)(Code)
Returns the path of the given resource.
Parameters:
  uri - The URI of the resource the resource path



normalize
public static String normalize(String uri)(Code)
Normalize a uri containing ../ and ./ paths.
Parameters:
  uri - The uri path to normalize The normalized uri



parameterize
public static String parameterize(String uri, Map parameters)(Code)
Add parameters stored in the Map to the uri string. Map can contain Object values which will be converted to the string, or Object arrays, which will be treated as multivalue attributes.
Parameters:
  uri - The uri to add parameters into
Parameters:
  parameters - The map containing parameters to be added The uri with added parameters



relativize
public static String relativize(String path, String absoluteResource)(Code)
Relativize an absolute resource on a given absolute path.
Parameters:
  path - The absolute path
Parameters:
  absoluteResource - The absolute resource the resource relative to the given path



removeAuthorisation
public static String removeAuthorisation(String uri)(Code)
Remove any authorisation details from a URI



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.