com.ibm.portal.resolver.uri
Class BaseURI

java.lang.Object
  extended by com.ibm.portal.resolver.uri.BaseURI
All Implemented Interfaces:
Constants
Direct Known Subclasses:
DataURI, OperationURI, PortletURI, SpaURI, ZipDataURI

public abstract class BaseURI
extends java.lang.Object
implements Constants

Base class for URI implementations that facilitates the URL encoding and decoding process.


Field Summary
protected static int LOG_LEVEL
          Default logging level
protected static PocURIFactory NULL_FACTORY
          the inexistent factory
 
Fields inherited from interface com.ibm.portal.resolver.uri.Constants
ESCAPE_CHAR, ESCAPE_STRG
 
Constructor Summary
BaseURI()
           
 
Method Summary
static java.net.URI createURI(java.lang.String uriStrg)
          Deprecated. 
protected static java.net.URI createURI(java.lang.String aUriString, PocURIFactory aFactory)
          Constructs a URI
static java.net.URI createURI(java.lang.String scheme, java.lang.String part)
          Deprecated. 
protected static java.net.URI createURI(java.lang.String aScheme, java.lang.String aSsp, PocURIFactory aFactory)
          Constructs a URI
protected static java.lang.String decode(java.lang.StringBuilder out, java.lang.String strg, int off, int len)
           
protected static java.lang.String decode(java.lang.String strg, int off, int len, java.io.StringWriter out)
           
protected static java.lang.String decode(java.lang.String strg, int off, java.io.StringWriter out)
           
protected static java.lang.String decode(java.lang.String strg, java.io.StringWriter out)
          Decodes a string fragment
protected static java.lang.StringBuilder encode(java.lang.StringBuilder out, java.lang.String strg)
           
protected static java.io.Writer encode(java.io.Writer out, java.lang.String strg)
           
protected static java.lang.String normalizeRawSchemeSpecificPart(java.lang.String part)
          Normalizes the raw scheme specific part of an URI such that it represents another URI.
protected static java.lang.String normalizeRawSchemeSpecificPart(java.net.URI part)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_FACTORY

protected static final PocURIFactory NULL_FACTORY
the inexistent factory


LOG_LEVEL

protected static final int LOG_LEVEL
Default logging level

See Also:
Constant Field Values
Constructor Detail

BaseURI

public BaseURI()
Method Detail

createURI

@Deprecated
public static final java.net.URI createURI(java.lang.String uriStrg)
Deprecated. 

Creates a URI under the assumption that the string is valid

Parameters:
uriStrg - URI string to check
Returns:
the URI

createURI

protected static final java.net.URI createURI(java.lang.String aUriString,
                                              PocURIFactory aFactory)
                                       throws java.net.URISyntaxException,
                                              java.io.IOException
Constructs a URI

Parameters:
aUriString - the URI string
aFactory - the factory, may be null
Returns:
the generated URI
Throws:
java.net.URISyntaxException
java.io.IOException
Since:
8.0

createURI

@Deprecated
public static final java.net.URI createURI(java.lang.String scheme,
                                                      java.lang.String part)
Deprecated. 

Creates a URI under the assumption that the string is valid

Parameters:
uriStrg - URI string to check
Returns:
the URI

createURI

protected static final java.net.URI createURI(java.lang.String aScheme,
                                              java.lang.String aSsp,
                                              PocURIFactory aFactory)
                                       throws java.net.URISyntaxException
Constructs a URI

Parameters:
aScheme - the scheme
aSsp - the scheme specific part
aFactory - the factory, may be null
Returns:
the generated URI
Throws:
java.net.URISyntaxException
Since:
8.0

decode

protected static java.lang.String decode(java.lang.String strg,
                                         int off,
                                         int len,
                                         java.io.StringWriter out)
                                  throws java.io.IOException
Parameters:
strg -
off -
len -
out -
Returns:
Throws:
java.io.IOException

decode

protected static java.lang.String decode(java.lang.String strg,
                                         int off,
                                         java.io.StringWriter out)
                                  throws java.io.IOException
Parameters:
strg -
off -
out -
Returns:
Throws:
java.io.IOException

decode

protected static java.lang.String decode(java.lang.String strg,
                                         java.io.StringWriter out)
                                  throws java.io.IOException
Decodes a string fragment

Parameters:
strg -
out -
Returns:
Throws:
java.io.IOException

decode

protected static java.lang.String decode(java.lang.StringBuilder out,
                                         java.lang.String strg,
                                         int off,
                                         int len)
Parameters:
strg -
off -
len -
out -
Returns:
Throws:
java.io.IOException

encode

protected static java.lang.StringBuilder encode(java.lang.StringBuilder out,
                                                java.lang.String strg)

encode

protected static java.io.Writer encode(java.io.Writer out,
                                       java.lang.String strg)
                                throws java.io.IOException
Parameters:
out -
strg -
Returns:
Throws:
java.io.IOException

normalizeRawSchemeSpecificPart

protected static final java.lang.String normalizeRawSchemeSpecificPart(java.lang.String part)
Normalizes the raw scheme specific part of an URI such that it represents another URI. The method tries the URL decode the scheme part of the URI but leaves the scheme specific part intact, i.e. the string "scheme%3aa%20b" will be converted to "scheme:a%20b"

Parameters:
part - the part to decode
Returns:
the normalized URI

normalizeRawSchemeSpecificPart

protected static final java.lang.String normalizeRawSchemeSpecificPart(java.net.URI part)
Parameters:
part -
Returns: