org.opensaml.artifact
Class URI

java.lang.Object
  extended byorg.opensaml.artifact.URI

public class URI
extends Object

A simple class to represent URIs.

Author:
Chad La Joie

Constructor Summary
URI()
          Constructor.
URI(byte[] uri, String encoding)
          Constructor.
URI(String uri)
          Constructor.
 
Method Summary
 boolean equals(URI otherUri)
          Checks to see if this URI is the same as the given URI
 String getURI()
          Gets the URI as a string.
 void setURI(byte[] uri, String encoding)
          Sets the URI.
 void setURI(String uri)
          Sets the URI.
 byte[] toBytes()
          Gets the URI as an array of bytes.
 String toString()
          Gets the URI as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URI

public URI()
Constructor.


URI

public URI(String uri)
Constructor.

Parameters:
uri - the URI

URI

public URI(byte[] uri,
           String encoding)
    throws UnsupportedEncodingException
Constructor.

Parameters:
uri - the URI in byte array format
encoding - the encoding to use when converting to a string
Throws:
UnsupportedEncodingException - thrown if the encoding is not supported by the VM
Method Detail

getURI

public String getURI()
Gets the URI as a string.

Returns:
the URI

setURI

public void setURI(String uri)
Sets the URI.

Parameters:
uri - the URI

setURI

public void setURI(byte[] uri,
                   String encoding)
            throws UnsupportedEncodingException
Sets the URI.

Parameters:
uri - the URI in byte array format
encoding - the encoding to use when converting to a string
Throws:
UnsupportedEncodingException - thrown if the encoding is not supported by the VM

toString

public String toString()
Gets the URI as a string.

Returns:
the URI

toBytes

public byte[] toBytes()
Gets the URI as an array of bytes.

Returns:
the URI

equals

public boolean equals(URI otherUri)
Checks to see if this URI is the same as the given URI

Parameters:
otherUri - the other URI
Returns:
true if thier equal, false if not


Copyright ? 2005 UCAID. All Rights Reserved.