Package org.apache.struts2.result.plain

# Class ResponseBuilder

java.lang.Object
org.apache.struts2.result.plain.ResponseBuilder

public class ResponseBuilder extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `APPLICATION_JSON`
  `static final String`
  `CONTENT_TYPE`
  `static final String`
  `TEXT_HTML`
  `static final String`
  `TEXT_PLAIN`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResponseBuilder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getBody()`
  `Iterable<jakarta.servlet.http.Cookie>`
  `getCookies()`
  `Iterable<HttpHeader<Long>>`
  `getDateHeaders()`
  `Iterable<HttpHeader<Integer>>`
  `getIntHeaders()`
  `Iterable<HttpHeader<String>>`
  `getStringHeaders()`
  `ResponseBuilder`
  `withContentType(String contentType)`
  `ResponseBuilder`
  `withContentTypeJson()`
  `ResponseBuilder`
  `withContentTypeTextHtml()`
  `ResponseBuilder`
  `withContentTypeTextPlain()`
  `ResponseBuilder`
  `withCookie(String name, String value)`
  `ResponseBuilder`
  `withHeader(String name, Integer value)`
  `ResponseBuilder`
  `withHeader(String name, Long value)`
  `ResponseBuilder`
  `withHeader(String name, String value)`
  `ResponseBuilder`
  `write(String out)`
  `ResponseBuilder`
  `writeLine(String out)`

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

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

- ## Field Details

  - ### CONTENT_TYPE

    public static final String CONTENT_TYPE
    See Also:
      - Constant Field Values

  - ### TEXT_PLAIN

    public static final String TEXT_PLAIN
    See Also:
      - Constant Field Values

  - ### TEXT_HTML

    public static final String TEXT_HTML
    See Also:
      - Constant Field Values

  - ### APPLICATION_JSON

    public static final String APPLICATION_JSON
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ResponseBuilder

    public ResponseBuilder()

- ## Method Details

  - ### write

    public ResponseBuilder write(String out)

  - ### writeLine

    public ResponseBuilder writeLine(String out)

  - ### withHeader

    public ResponseBuilder withHeader(String name, String value)

  - ### withHeader

    public ResponseBuilder withHeader(String name, Long value)

  - ### withHeader

    public ResponseBuilder withHeader(String name, Integer value)

  - ### withContentTypeTextPlain

    public ResponseBuilder withContentTypeTextPlain()

  - ### withContentTypeTextHtml

    public ResponseBuilder withContentTypeTextHtml()

  - ### withContentTypeJson

    public ResponseBuilder withContentTypeJson()

  - ### withContentType

    public ResponseBuilder withContentType(String contentType)

  - ### withCookie

    public ResponseBuilder withCookie(String name, String value)

  - ### getStringHeaders

    public Iterable<HttpHeader<String>> getStringHeaders()

  - ### getDateHeaders

    public Iterable<HttpHeader<Long>> getDateHeaders()

  - ### getIntHeaders

    public Iterable<HttpHeader<Integer>> getIntHeaders()

  - ### getCookies

    public Iterable<jakarta.servlet.http.Cookie> getCookies()

  - ### getBody

    public String getBody()