org.apache.commons.httpclient
Class HttpException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended byorg.apache.commons.httpclient.HttpException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ProtocolException, URIException

public class HttpException
extends java.io.IOException

Signals that an HTTP or HttpClient exception has occurred.

Version:
$Revision: 1.17 $ $Date: 2004/04/18 23:51:35 $
Author:
Laura Werner
See Also:
Serialized Form

Constructor Summary
HttpException()
          Creates a new HttpException with a null detail message.
HttpException(java.lang.String message)
          Creates a new HttpException with the specified detail message.
HttpException(java.lang.String message, java.lang.Throwable cause)
          Creates a new HttpException with the specified detail message and cause.
 
Method Summary
 java.lang.Throwable getCause()
          Return the Throwable that caused this exception, or null if the cause is unavailable, unknown, or not a Throwable.
 void printStackTrace()
          Print this HttpException and its stack trace to the standard error stream.
 void printStackTrace(java.io.PrintStream s)
          Print this HttpException and its stack trace to the specified print stream.
 void printStackTrace(java.io.PrintWriter s)
          Print this HttpException and its stack trace to the specified print writer.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpException

public HttpException()
Creates a new HttpException with a null detail message.


HttpException

public HttpException(java.lang.String message)
Creates a new HttpException with the specified detail message.

Parameters:
message - the exception detail message

HttpException

public HttpException(java.lang.String message,
                     java.lang.Throwable cause)
Creates a new HttpException with the specified detail message and cause.

Parameters:
message - the exception detail message
cause - the Throwable that caused this exception, or null if the cause is unavailable, unknown, or not a Throwable
Method Detail

getCause

public java.lang.Throwable getCause()
Return the Throwable that caused this exception, or null if the cause is unavailable, unknown, or not a Throwable.

Returns:
the Throwable that caused this exception, or null if the cause is unavailable, unknown, or not a Throwable

printStackTrace

public void printStackTrace()
Print this HttpException and its stack trace to the standard error stream.


printStackTrace

public void printStackTrace(java.io.PrintStream s)
Print this HttpException and its stack trace to the specified print stream.

Parameters:
s - the PrintStream to which the exception and its stack trace should be written

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Print this HttpException and its stack trace to the specified print writer.

Parameters:
s - the PrintWriter to which the exception and its stack trace should be written


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