dk.netarkivet.common.utils
Class FixedUURI

java.lang.Object
  extended by org.apache.commons.httpclient.URI
      extended by org.archive.net.LaxURI
          extended by org.archive.net.UURI
              extended by dk.netarkivet.common.utils.FixedUURI
All Implemented Interfaces:
java.io.Serializable, java.lang.CharSequence, java.lang.Cloneable, java.lang.Comparable

public class FixedUURI
extends org.archive.net.UURI

Fixed UURI which extends UURI to fix an NPE bug in getReferencedHost. Pending fix of bug in Heritrix. The bug has been reported, and has number 616: http://webteam.archive.org/jira/browse/HER-616

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.commons.httpclient.URI
org.apache.commons.httpclient.URI.DefaultCharsetChanged, org.apache.commons.httpclient.URI.LocaleToCharsetMap
 
Field Summary
 
Fields inherited from class org.archive.net.UURI
MASSAGEHOST_PATTERN, MAX_URL_LENGTH
 
Fields inherited from class org.archive.net.LaxURI
HTTP_SCHEME, HTTPS_SCHEME, lax_abs_path, lax_query, lax_rel_segment
 
Fields inherited from class org.apache.commons.httpclient.URI
_authority, _fragment, _host, _is_abs_path, _is_hier_part, _is_hostname, _is_IPv4address, _is_IPv6reference, _is_net_path, _is_opaque_part, _is_reg_name, _is_rel_path, _is_server, _opaque, _path, _port, _query, _scheme, _uri, _userinfo, abs_path, absoluteURI, allowed_abs_path, allowed_authority, allowed_fragment, allowed_host, allowed_IPv6reference, allowed_opaque_part, allowed_query, allowed_reg_name, allowed_rel_path, allowed_userinfo, allowed_within_authority, allowed_within_path, allowed_within_query, allowed_within_userinfo, alpha, alphanum, authority, control, defaultDocumentCharset, defaultDocumentCharsetByLocale, defaultDocumentCharsetByPlatform, defaultProtocolCharset, delims, digit, disallowed_opaque_part, disallowed_rel_path, domainlabel, escaped, fragment, hash, hex, hier_part, host, hostname, hostport, IPv4address, IPv6address, IPv6reference, mark, net_path, opaque_part, param, path, path_segments, pchar, percent, port, protocolCharset, query, reg_name, rel_path, rel_segment, relativeURI, reserved, rootPath, scheme, segment, server, space, toplabel, unreserved, unwise, URI_reference, uric, uric_no_slash, userinfo, within_userinfo
 
Constructor Summary
protected FixedUURI()
           
  FixedUURI(java.lang.String string, boolean b)
           
protected FixedUURI(java.lang.String string, boolean b, java.lang.String string1)
           
protected FixedUURI(org.archive.net.UURI uuri, org.archive.net.UURI uuri1)
           
 
Method Summary
 java.lang.String getReferencedHost()
          Return the hostname for this URI, giving the looked-up host on dns-URLS.
 
Methods inherited from class org.archive.net.UURI
charAt, coalesceHostAuthorityStrings, coalesceUriStrings, compareTo, equals, from, getAuthorityMinusUserinfo, getEscapedURI, getHost, getHostBasename, getSurtForm, hasScheme, length, parseFilename, resolve, resolve, resolve, subSequence, toString
 
Methods inherited from class org.archive.net.LaxURI
decode, decode, getPath, getPathQuery, getURI, lax, parseAuthority, parseUriReference, setURI, validate, validate
 
Methods inherited from class org.apache.commons.httpclient.URI
clone, encode, equals, getAboveHierPath, getAuthority, getCurrentHierPath, getDefaultDocumentCharset, getDefaultDocumentCharsetByLocale, getDefaultDocumentCharsetByPlatform, getDefaultProtocolCharset, getEscapedAboveHierPath, getEscapedAuthority, getEscapedCurrentHierPath, getEscapedFragment, getEscapedName, getEscapedPath, getEscapedPathQuery, getEscapedQuery, getEscapedURIReference, getEscapedUserinfo, getFragment, getName, getPort, getProtocolCharset, getQuery, getRawAboveHierPath, getRawAuthority, getRawCurrentHierPath, getRawCurrentHierPath, getRawFragment, getRawHost, getRawName, getRawPath, getRawPathQuery, getRawQuery, getRawScheme, getRawURI, getRawURIReference, getRawUserinfo, getScheme, getURIReference, getUserinfo, hasAuthority, hasFragment, hashCode, hasQuery, hasUserinfo, indexFirstOf, indexFirstOf, indexFirstOf, indexFirstOf, isAbsoluteURI, isAbsPath, isHierPart, isHostname, isIPv4address, isIPv6reference, isNetPath, isOpaquePart, isRegName, isRelativeURI, isRelPath, isServer, normalize, normalize, prevalidate, removeFragmentIdentifier, resolvePath, setDefaultDocumentCharset, setDefaultProtocolCharset, setEscapedAuthority, setEscapedFragment, setEscapedPath, setEscapedQuery, setFragment, setPath, setQuery, setRawAuthority, setRawFragment, setRawPath, setRawQuery
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FixedUURI

protected FixedUURI()

FixedUURI

protected FixedUURI(java.lang.String string,
                    boolean b,
                    java.lang.String string1)
             throws org.apache.commons.httpclient.URIException
Throws:
org.apache.commons.httpclient.URIException

FixedUURI

protected FixedUURI(org.archive.net.UURI uuri,
                    org.archive.net.UURI uuri1)
             throws org.apache.commons.httpclient.URIException
Throws:
org.apache.commons.httpclient.URIException

FixedUURI

public FixedUURI(java.lang.String string,
                 boolean b)
          throws org.apache.commons.httpclient.URIException
Throws:
org.apache.commons.httpclient.URIException
Method Detail

getReferencedHost

public java.lang.String getReferencedHost()
                                   throws org.apache.commons.httpclient.URIException
Return the hostname for this URI, giving the looked-up host on dns-URLS.

Overrides:
getReferencedHost in class org.archive.net.UURI
Returns:
hostname for this URI, or null if this cannot be calculated.
Throws:
org.apache.commons.httpclient.URIException - on serious parse errors.
See Also:
UURI.getReferencedHost()