Java Doc for UURI.java in  » Web-Crawler » heritrix » org » archive » net » 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 Crawler » heritrix » org.archive.net 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.net.URI
      org.archive.net.LaxURI
         org.archive.net.UURI

UURI
public class UURI extends LaxURI implements CharSequence,Serializable(Code)
Usable URI. This class wraps org.apache.commons.httpclient.URI adding caching and methods. It cannot be instantiated directly. Go via UURIFactory.

We used to use java.net.URI for parsing URIs but ran across quirky behaviors and bugs. java.net.URI is not subclassable -- its final -- and its unlikely that java.net.URI will change any time soon (See Gordon's considered petition here: java.net.URI should have loose/tolerant/compatibility option (or allow reuse)).

This class tries to cache calculated strings such as the extracted host and this class as a string rather than have the parent class rerun its calculation everytime.
author:
   gojomo
author:
   stack
See Also:   org.apache.commons.httpclient.URI



Field Summary
final public static  StringMASSAGEHOST_PATTERN
    
final public static  intMAX_URL_LENGTH
     Consider URIs too long for IE as illegal.

Constructor Summary
protected  UURI()
     Shutdown access to default constructor.
protected  UURI(String uri, boolean escaped, String charset)
    
protected  UURI(UURI base, UURI relative)
    
public  UURI(String uri, boolean escaped)
    

Method Summary
public  charcharAt(int index)
    
protected  voidcoalesceHostAuthorityStrings()
     The two String fields cachedHost and cachedAuthorityMinusUserInfo are usually identical; if so, coalesce into a single instance.
protected  voidcoalesceUriStrings()
     The two String fields cachedString and cachedEscapedURI are usually identical; if so, coalesce into a single instance.
public  intcompareTo(Object arg0)
    
public  booleanequals(Object obj)
     Test an object if this UURI is equal to another.
public static  UURIfrom(Object o)
     Convenience method for finding the UURI inside an Object likely to have (or be/imply) one.
public  StringgetAuthorityMinusUserinfo()
     Return the authority minus userinfo (if any).
public synchronized  StringgetEscapedURI()
    
public synchronized  StringgetHost()
    
public  StringgetHostBasename()
     Strips www variants from the host. Strips www[0-9]*\.
public  StringgetReferencedHost()
     Return the referenced host in the UURI, if any, also extracting the host of a DNS-lookup URI where necessary.
public  StringgetSurtForm()
    
public static  booleanhasScheme(String possibleUrl)
     Test if passed String has likely URI scheme prefix.
Parameters:
  possibleUrl - URL string to examine.
public  intlength()
    
public static  StringparseFilename(String pathOrUri)
    
Parameters:
  pathOrUri - A file path or a URI.
public  UURIresolve(String uri)
    
Parameters:
  uri - URI as string that is resolved relative to this UURI.
public  UURIresolve(String uri, boolean e)
    
Parameters:
  uri - URI as string that is resolved relative to this UURI.
Parameters:
  e - True if escaped.
public  UURIresolve(String uri, boolean e, String charset)
    
Parameters:
  uri - URI as string that is resolved relative to this UURI.
Parameters:
  e - True if uri is escaped.
Parameters:
  charset - Charset to use.
public  CharSequencesubSequence(int start, int end)
    
public synchronized  StringtoString()
    

Field Detail
MASSAGEHOST_PATTERN
final public static String MASSAGEHOST_PATTERN(Code)



MAX_URL_LENGTH
final public static int MAX_URL_LENGTH(Code)
Consider URIs too long for IE as illegal.




Constructor Detail
UURI
protected UURI()(Code)
Shutdown access to default constructor.



UURI
protected UURI(String uri, boolean escaped, String charset) throws URIException(Code)

Parameters:
  uri - String representation of an absolute URI.
Parameters:
  escaped - If escaped.
Parameters:
  charset - Charset to use.
throws:
  org.apache.commons.httpclient.URIException -



UURI
protected UURI(UURI base, UURI relative) throws URIException(Code)

Parameters:
  relative - String representation of URI.
Parameters:
  base - Parent UURI to use derelativizing.
throws:
  org.apache.commons.httpclient.URIException -



UURI
public UURI(String uri, boolean escaped) throws URIException, NullPointerException(Code)

Parameters:
  uri - String representation of a URI.
Parameters:
  escaped - If escaped.
throws:
  NullPointerException -
throws:
  URIException -




Method Detail
charAt
public char charAt(int index)(Code)



coalesceHostAuthorityStrings
protected void coalesceHostAuthorityStrings()(Code)
The two String fields cachedHost and cachedAuthorityMinusUserInfo are usually identical; if so, coalesce into a single instance.



coalesceUriStrings
protected void coalesceUriStrings()(Code)
The two String fields cachedString and cachedEscapedURI are usually identical; if so, coalesce into a single instance.



compareTo
public int compareTo(Object arg0)(Code)



equals
public boolean equals(Object obj)(Code)
Test an object if this UURI is equal to another.
Parameters:
  obj - an object to compare true if two URI objects are equal



from
public static UURI from(Object o)(Code)
Convenience method for finding the UURI inside an Object likely to have (or be/imply) one.
Parameters:
  o - Object that is, has, or implies a UURI the UURI found, or null if none



getAuthorityMinusUserinfo
public String getAuthorityMinusUserinfo() throws URIException(Code)
Return the authority minus userinfo (if any). If no userinfo present, just returns the authority. The authority stripped of any userinfo if present.
throws:
  URIException -



getEscapedURI
public synchronized String getEscapedURI()(Code)



getHost
public synchronized String getHost() throws URIException(Code)



getHostBasename
public String getHostBasename() throws URIException(Code)
Strips www variants from the host. Strips www[0-9]*\. from the host. If calling getHostBaseName becomes a performance issue we should consider adding the hostBasename member that is set on initialization. Host's basename.
throws:
  URIException -



getReferencedHost
public String getReferencedHost() throws URIException(Code)
Return the referenced host in the UURI, if any, also extracting the host of a DNS-lookup URI where necessary. the target or topic host of the URI
throws:
  URIException -



getSurtForm
public String getSurtForm()(Code)
Return the 'SURT' format of this UURI



hasScheme
public static boolean hasScheme(String possibleUrl)(Code)
Test if passed String has likely URI scheme prefix.
Parameters:
  possibleUrl - URL string to examine. True if passed string looks like it could be an URL.



length
public int length()(Code)



parseFilename
public static String parseFilename(String pathOrUri) throws URISyntaxException(Code)

Parameters:
  pathOrUri - A file path or a URI. Path parsed from passed pathOrUri.
throws:
  URISyntaxException -



resolve
public UURI resolve(String uri) throws URIException(Code)

Parameters:
  uri - URI as string that is resolved relative to this UURI. UURI that uses this UURI as base.
throws:
  URIException -



resolve
public UURI resolve(String uri, boolean e) throws URIException(Code)

Parameters:
  uri - URI as string that is resolved relative to this UURI.
Parameters:
  e - True if escaped. UURI that uses this UURI as base.
throws:
  URIException -



resolve
public UURI resolve(String uri, boolean e, String charset) throws URIException(Code)

Parameters:
  uri - URI as string that is resolved relative to this UURI.
Parameters:
  e - True if uri is escaped.
Parameters:
  charset - Charset to use. UURI that uses this UURI as base.
throws:
  URIException -



subSequence
public CharSequence subSequence(int start, int end)(Code)



toString
public synchronized String toString()(Code)
Override to cache result String representation of this URI



Fields inherited from org.archive.net.LaxURI
final protected static char[] HTTPS_SCHEME(Code)(Java Doc)
final protected static char[] HTTP_SCHEME(Code)(Java Doc)
final protected static BitSet lax_abs_path(Code)(Java Doc)
final protected static BitSet lax_query(Code)(Java Doc)
final protected static BitSet lax_rel_segment(Code)(Java Doc)

Methods inherited from org.archive.net.LaxURI
protected static String decode(char[] component, String charset) throws URIException(Code)(Java Doc)
protected static String decode(String component, String charset) throws URIException(Code)(Java Doc)
public String getPath() throws URIException(Code)(Java Doc)
public String getPathQuery() throws URIException(Code)(Java Doc)
public String getURI() throws URIException(Code)(Java Doc)
protected BitSet lax(BitSet generous)(Code)(Java Doc)
protected void parseAuthority(String original, boolean escaped) throws URIException(Code)(Java Doc)
protected void parseUriReference(String original, boolean escaped) throws URIException(Code)(Java Doc)
protected void setURI()(Code)(Java Doc)
protected boolean validate(char[] component, BitSet generous)(Code)(Java Doc)
protected boolean validate(char[] component, int soffset, int eoffset, BitSet generous)(Code)(Java Doc)

Methods inherited from java.net.URI
public int compareTo(URI that)(Code)(Java Doc)
public static URI create(String str)(Code)(Java Doc)
public boolean equals(Object ob)(Code)(Java Doc)
public String getAuthority()(Code)(Java Doc)
public String getFragment()(Code)(Java Doc)
public String getHost()(Code)(Java Doc)
public String getPath()(Code)(Java Doc)
public int getPort()(Code)(Java Doc)
public String getQuery()(Code)(Java Doc)
public String getRawAuthority()(Code)(Java Doc)
public String getRawFragment()(Code)(Java Doc)
public String getRawPath()(Code)(Java Doc)
public String getRawQuery()(Code)(Java Doc)
public String getRawSchemeSpecificPart()(Code)(Java Doc)
public String getRawUserInfo()(Code)(Java Doc)
public String getScheme()(Code)(Java Doc)
public String getSchemeSpecificPart()(Code)(Java Doc)
public String getUserInfo()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isAbsolute()(Code)(Java Doc)
public boolean isOpaque()(Code)(Java Doc)
public URI normalize()(Code)(Java Doc)
public URI parseServerAuthority() throws URISyntaxException(Code)(Java Doc)
public URI relativize(URI uri)(Code)(Java Doc)
public URI resolve(URI uri)(Code)(Java Doc)
public URI resolve(String str)(Code)(Java Doc)
public String toASCIIString()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public URL toURL() throws MalformedURLException(Code)(Java Doc)

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.