Class BytesRestResponse

org.elasticsearch.rest.RestResponse
org.elasticsearch.rest.BytesRestResponse

public class BytesRestResponse extends RestResponse
  • Field Details

  • Constructor Details

    • BytesRestResponse

      public BytesRestResponse(RestStatus status, org.elasticsearch.common.xcontent.XContentBuilder builder)
      Creates a new response based on XContentBuilder.
    • BytesRestResponse

      public BytesRestResponse(RestStatus status,  content)
      Creates a new plain text response.
    • BytesRestResponse

      public BytesRestResponse(RestStatus status,  contentType,  content)
      Creates a new plain text response.
    • BytesRestResponse

      public BytesRestResponse(RestStatus status,  contentType, byte[] content)
      Creates a binary response.
    • BytesRestResponse

      public BytesRestResponse(RestStatus status,  contentType, BytesReference content)
      Creates a binary response.
    • BytesRestResponse

      public BytesRestResponse(RestChannel channel,  e) throws
      Throws:
    • BytesRestResponse

      public BytesRestResponse(RestChannel channel, RestStatus status,  e) throws
      Throws:
  • Method Details

    • contentType

      public  contentType()
      Description copied from class: RestResponse
      The response content type.
      Specified by:
      contentType in class RestResponse
    • content

      public BytesReference content()
      Description copied from class: RestResponse
      The response content. Note, if the content is Releasable it should automatically be released when done by the channel sending it.
      Specified by:
      content in class RestResponse
    • status

      public RestStatus status()
      Description copied from class: RestResponse
      The rest status code.
      Specified by:
      status in class RestResponse
    • skipStackTrace

      protected boolean skipStackTrace()
    • errorFromXContent

      public static ElasticsearchStatusException errorFromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws
      Throws: