net.sf.uadetector.exception
Class CanNotOpenStreamException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.sf.uadetector.exception.CanNotOpenStreamException
All Implemented Interfaces:
java.io.Serializable

public class CanNotOpenStreamException
extends java.lang.RuntimeException

Thrown to indicate that no stream to an URL can be established.

This exception is intended to tunnel the checked exception IOException during the call URL.openStream().

Author:
André Rouél
See Also:
Serialized Form

Field Summary
protected static java.lang.String DEFAULT_MESSAGE
           
protected static java.lang.String MESSAGE_WITH_URL
           
 
Constructor Summary
CanNotOpenStreamException()
          Constructs an CanNotOpenStreamException with the default message DEFAULT_MESSAGE.
CanNotOpenStreamException(java.lang.String url)
          Constructs an CanNotOpenStreamException with the message MESSAGE_WITH_URL including the given URL as string representation.
CanNotOpenStreamException(java.lang.String url, java.lang.Throwable cause)
          Constructs a new exception with the message MESSAGE_WITH_URL including the given URL as string representation and cause.
CanNotOpenStreamException(java.lang.Throwable cause)
          Constructs a new exception with the default message DEFAULT_MESSAGE.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MESSAGE

protected static final java.lang.String DEFAULT_MESSAGE
See Also:
Constant Field Values

MESSAGE_WITH_URL

protected static final java.lang.String MESSAGE_WITH_URL
See Also:
Constant Field Values
Constructor Detail

CanNotOpenStreamException

public CanNotOpenStreamException()
Constructs an CanNotOpenStreamException with the default message DEFAULT_MESSAGE.


CanNotOpenStreamException

public CanNotOpenStreamException(java.lang.String url)
Constructs an CanNotOpenStreamException with the message MESSAGE_WITH_URL including the given URL as string representation.

Parameters:
url - the URL to which no stream can be established

CanNotOpenStreamException

public CanNotOpenStreamException(java.lang.String url,
                                 java.lang.Throwable cause)
Constructs a new exception with the message MESSAGE_WITH_URL including the given URL as string representation and cause.

Parameters:
url - the URL to which no stream can be established
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

CanNotOpenStreamException

public CanNotOpenStreamException(java.lang.Throwable cause)
Constructs a new exception with the default message DEFAULT_MESSAGE.

Parameters:
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)


Copyright © 2011-2014. All Rights Reserved.