# Uses of Class
com.sun.net.httpserver.HttpServer

Packages that use HttpServer
Package
Description
com.sun.net.httpserver
Provides a simple high-level Http server API, which can be used to build embedded HTTP servers.
com.sun.net.httpserver.spi
Provides a pluggable service provider interface, which allows the HTTP server implementation to be replaced with other implementations.

- ## Uses of HttpServer in com.sun.net.httpserver

  Subclasses of HttpServer in com.sun.net.httpserver
  Modifier and Type
  Class
  Description
  `class`
  `HttpsServer`
  This class is an extension of `HttpServer` which provides support for HTTPS.
  Methods in com.sun.net.httpserver that return HttpServer
  Modifier and Type
  Method
  Description
  `static HttpServer`
  HttpServer.`create()`
  Creates a `HttpServer` instance which is initially not bound to any local address/port.
  `static HttpServer`
  HttpServer.`create(InetSocketAddress addr, int backlog)`
  Create a `HttpServer` instance which will bind to the specified `InetSocketAddress` (IP address and port number).
  `static HttpServer`
  HttpServer.`create(InetSocketAddress addr, int backlog, String path, HttpHandler handler, Filter... filters)`
  Creates an `HttpServer` instance with an initial context.
  `static HttpServer`
  SimpleFileServer.`createFileServer(InetSocketAddress addr, Path rootDirectory, SimpleFileServer.OutputLevel outputLevel)`
  Creates a file server that serves files from a given path.
  `abstract HttpServer`
  HttpContext.`getServer()`
  Returns the server this context was created with.

- ## Uses of HttpServer in com.sun.net.httpserver.spi

  Methods in com.sun.net.httpserver.spi that return HttpServer
  Modifier and Type
  Method
  Description
  `abstract HttpServer`
  HttpServerProvider.`createHttpServer(InetSocketAddress addr, int backlog)`
  creates a HttpServer from this provider