Class WebServerDispatcher.Resource.Builder

    • Constructor Detail

      • Builder

        public Builder()
        Constructs an instance.
    • Method Detail

      • setData

        @CanIgnoreReturnValue
        public WebServerDispatcher.Resource.Builder setData​(byte[] data)
        Sets the data served by this resource. This is required.
        Returns:
        this builder, for convenience.
      • supportsRangeRequests

        @CanIgnoreReturnValue
        public WebServerDispatcher.Resource.Builder supportsRangeRequests​(boolean supportsRangeRequests)
        Sets if RFC 7233 range requests should be supported for this resource. Defaults to false.
        Returns:
        this builder, for convenience.
      • resolvesToUnknownLength

        @CanIgnoreReturnValue
        public WebServerDispatcher.Resource.Builder resolvesToUnknownLength​(boolean resolvesToUnknownLength)
        Sets if the server shouldn't include the resource length in header responses.

        If true, responses to unbound requests won't include a Content-Length header and Content-Range headers won't include the total resource length.

        Returns:
        this builder, for convenience.