com.radekzitek.userver.http
Class HttpUri

java.lang.Object
  extended bycom.radekzitek.userver.http.HttpUri
All Implemented Interfaces:
HttpObject

public class HttpUri
extends java.lang.Object
implements HttpObject

Author:
rzitek

Field Summary
private static org.apache.log4j.Logger LOG
          Log4j logger.
private  java.net.URI uri
           
 
Constructor Summary
HttpUri()
          Constructs empty URI.
HttpUri(java.lang.String uriString)
          Constructs URI based on the provided URI string.
 
Method Summary
 void clear()
          Clears the URI.
 java.lang.String getAuthority()
           
 java.lang.String getFragment()
           
 java.lang.String getHost()
           
 java.lang.String getPath()
           
 int getPort()
           
 java.lang.String getQuery()
           
 java.lang.String getScheme()
           
 java.lang.String getSchemeSpecificPart()
           
 java.lang.String getUserInfo()
           
 void parse(java.lang.String uriString)
          Parses the given string into the URI.
 java.lang.String toString()
          Convertes the object to the string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG
Log4j logger.


uri

private java.net.URI uri
Constructor Detail

HttpUri

public HttpUri()
Constructs empty URI.


HttpUri

public HttpUri(java.lang.String uriString)
        throws HttpUriFormatException
Constructs URI based on the provided URI string.

Parameters:
uriString - the URI string
Throws:
HttpUriFormatException - Throws exception if the provided URI string does not match the expected pattern.
Method Detail

clear

public void clear()
Clears the URI.

Specified by:
clear in interface HttpObject

parse

public void parse(java.lang.String uriString)
           throws HttpUriFormatException
Parses the given string into the URI.

Specified by:
parse in interface HttpObject
Parameters:
uriString - the input URI string
Throws:
HttpUriFormatException - Throws exception if the provided string does not match the expected URI string.

getAuthority

public java.lang.String getAuthority()
Returns:
the authority

getFragment

public java.lang.String getFragment()
Returns:
the fragment

getHost

public java.lang.String getHost()
Returns:
the host

getPath

public java.lang.String getPath()
Returns:
the path

getPort

public int getPort()
Returns:
the port

getQuery

public java.lang.String getQuery()
Returns:
the query

getScheme

public java.lang.String getScheme()
Returns:
the scheme

getSchemeSpecificPart

public java.lang.String getSchemeSpecificPart()
Returns:
the scheme specific part

getUserInfo

public java.lang.String getUserInfo()
Returns:
the user info

toString

public java.lang.String toString()
Description copied from interface: HttpObject
Convertes the object to the string.

Specified by:
toString in interface HttpObject