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 and Description
    --- | ---
    `static String` | `APPLICATION_JSON`
    `static String` | `CONTENT_TYPE`
    `static String` | `TEXT_HTML`
    `static String` | `TEXT_PLAIN`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResponseBuilder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getBody()`
    `Iterable<javax.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 Detail

    - #### 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 Detail

    - #### ResponseBuilder

          public ResponseBuilder()

  - ### Method Detail

    - #### 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<javax.servlet.http.Cookie> getCookies()

    - #### getBody

          public String getBody()

Copyright © 2000–2022 Apache Software Foundation. All rights reserved.