Regain 2.1.0-STABLE API

net.sf.regain.crawler
Class HttpStreamException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.sf.regain.RegainException
              extended by net.sf.regain.crawler.HttpStreamException
All Implemented Interfaces:
Serializable

public class HttpStreamException
extends RegainException

Eine spezielle Exception, die nur von CrawlerToolkit.getHttpStream(java.net.URL) genutzt wird. Sie stellt auch den HTTP Antwortcode bereit, woraus sich z.B. erkennen läßt, ob die Exception auf Grund eines Dead-Links geworfen wurde.

Author:
tschneider
See Also:
Serialized Form

Field Summary
private  int mHttpReturnCode
          Der HTTP Antwortcode.
 
Constructor Summary
private HttpStreamException(String message, Throwable cause, int httpReturnCode)
          Erzeugt eine neue HttpStreamException-Instanz.
 
Method Summary
static HttpStreamException createInstance(String message, Throwable cause, URLConnection conn)
          Erzeugt eine neue HttpStreamException-Instanz.
 int getHttpReturnCode()
          Gibt den HTTP-Return-Code zurück.
 boolean isHttpReturnCodeFromDeadLink()
          Gibt zurück, ob der HTTP-Code con einem dead link stammt.
 
Methods inherited from class net.sf.regain.RegainException
getCause, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mHttpReturnCode

private int mHttpReturnCode
Der HTTP Antwortcode.

Constructor Detail

HttpStreamException

private HttpStreamException(String message,
                            Throwable cause,
                            int httpReturnCode)
Erzeugt eine neue HttpStreamException-Instanz.

Parameters:
message - Die Fehlermeldung.
cause - Der Fehler, der diese Ausnahme ausgel�st hat. Ist null wenn dies der urspr�ngliche Fehler ist.
httpReturnCode - Der HTTP-Return-Code
Method Detail

createInstance

public static HttpStreamException createInstance(String message,
                                                 Throwable cause,
                                                 URLConnection conn)
Erzeugt eine neue HttpStreamException-Instanz.

Parameters:
message - Die Fehlermeldung.
cause - Der Fehler, der diese Ausnahme ausgel�st hat. Ist null wenn dies der urspr�ngliche Fehler ist.
conn - Die HTTP-Connection, bei der der Fehler auftrat.
Returns:
Eine Ausnahme, die neben des urspr�nglichen Fehlers auch den HTTP-Return-Code enthält.

getHttpReturnCode

public int getHttpReturnCode()
Gibt den HTTP-Return-Code zurück.

Returns:
Der HTTP-Return-Code.

isHttpReturnCodeFromDeadLink

public boolean isHttpReturnCodeFromDeadLink()
Gibt zurück, ob der HTTP-Code con einem dead link stammt.

Returns:
Ob der HTTP-Code con einem dead link stammt.

Regain 2.1.0-STABLE API

Regain 2.1.0-STABLE, Copyright (C) 2004-2010 Til Schneider, www.murfman.de, Thomas Tesche, www.clustersystems.info