⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httpexception.java

📁 21天学通java的示例程序源代码
💻 JAVA
字号:
// HTTPException.java

package com.wrox.httpserver;

/**
 * This exception is thrown when an exception occurs while
 * processing an HTTP request.
 */
class HTTPException extends Exception {

  // HTTP status code
  private int status;

  /**
   * Constructs an HTTPException with the specified detail message, which
   * provides more information about why this exception has been thrown.
   */
  public HTTPException(String msg, int status) {

    // Calls the superclass constructor to construct an Exception
    // with the specified detail message
    super(msg);

    // Initialize instance variables
    this.status = status;
  }

  /**
   * Returns the HTTP status code of the exception.
   */
  public int getStatus() {
    return status;
  } 
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -