io.undertow.server.handlers

## Class ByteRangeHandler

- java.lang.Object
- - io.undertow.server.handlers.ByteRangeHandler

All Implemented Interfaces:
  HttpHandler

    public class ByteRangeHandler
    extends Object
    implements HttpHandler

Handler for Range requests. This is a generic handler that can handle range requests to any resource of a fixed content length i.e. any resource where the content-length header has been set. Note that this is not necessarily the most efficient way to handle range requests, as the full content will be generated and then discarded. At present this handler can only handle simple (i.e. single range) requests. If multiple ranges are requested the Range header will be ignored.

Author:
  Stuart Douglas

### Nested Class Summary

Nested Classes
`static class` `ByteRangeHandler.Builder`
`static class` `ByteRangeHandler.Wrapper`

### Constructor Summary

Constructors
Constructor and Description
`ByteRangeHandler(HttpHandler next, boolean sendAcceptRanges)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `handleRequest(HttpServerExchange exchange)` Handle the request.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ByteRangeHandler

    public ByteRangeHandler(HttpHandler next,
                            boolean sendAcceptRanges)

### Method Detail

#### handleRequest

    public void handleRequest(HttpServerExchange exchange)
                       throws Exception

Description copied from interface: `HttpHandler`
Handle the request.

Specified by:
  `handleRequest` in interface `HttpHandler`
Parameters:
  `exchange` - the HTTP request/response exchange
Throws:
  `Exception`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`