org.apache.commons.httpclient
Class URIException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--org.apache.commons.httpclient.URIException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HttpException

public class URIException
extends IOException

The URI parsing and escape encoding exception.

Why is it from IOException? To simplify the programming style for the inherited exception instances.

Version:
$Revision: 1.8.2.1 $ $Date: 2002/03/14 15:14:01
Author:
Sung-Gu
See Also:
Serialized Form

Field Summary
static int ESCAPING
          The URI escape encoding and decoding error.
static int PARSING
          The URI parsing error.
static int PUNYCODE
          The DNS punycode encoding or decoding error.
protected  String reason
          The reason message.
protected  int reasonCode
          The reason code.
static int UNKNOWN
          No specified reason code.
static int UNSUPPORTED_ENCODING
          The unsupported character encoding.
 
Constructor Summary
URIException()
          Default constructor.
URIException(int reasonCode)
          The constructor with a reason code argument.
URIException(int reasonCode, String reason)
          The constructor with a reason string and its code arguments.
URIException(String reason)
          The constructor with a reason string argument.
 
Method Summary
 String getReason()
          Get the reason message.
 int getReasonCode()
          Get the reason code.
 void setReason(String reason)
          Set the reason message.
 void setReasonCode(int reasonCode)
          Set the reason code.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
No specified reason code.

PARSING

public static final int PARSING
The URI parsing error.

UNSUPPORTED_ENCODING

public static final int UNSUPPORTED_ENCODING
The unsupported character encoding.

ESCAPING

public static final int ESCAPING
The URI escape encoding and decoding error.

PUNYCODE

public static final int PUNYCODE
The DNS punycode encoding or decoding error.

reasonCode

protected int reasonCode
The reason code.

reason

protected String reason
The reason message.
Constructor Detail

URIException

public URIException()
Default constructor.

URIException

public URIException(int reasonCode)
The constructor with a reason code argument.
Parameters:
reasonCode - the reason code

URIException

public URIException(int reasonCode,
                    String reason)
The constructor with a reason string and its code arguments.
Parameters:
reasonCode - the reason code
reason - the reason

URIException

public URIException(String reason)
The constructor with a reason string argument.
Parameters:
reason - the reason
Method Detail

getReasonCode

public int getReasonCode()
Get the reason code.
Returns:
the reason code

setReasonCode

public void setReasonCode(int reasonCode)
Set the reason code.
Parameters:
reasonCode - the reason code

getReason

public String getReason()
Get the reason message.
Returns:
the reason message

setReason

public void setReason(String reason)
Set the reason message.
Parameters:
reason - the reason message


Copyright © 2001-2004 Apache Software Foundation. All Rights Reserved.