org.elasticsearch.rest
Interface RestResponse

All Known Subinterfaces:
HttpResponse
All Known Implementing Classes:
AbstractRestResponse, BytesRestResponse, StringRestResponse, Utf8RestResponse, XContentRestResponse, XContentThrowableRestResponse

public interface RestResponse


Method Summary
 byte[] content()
          Returns the actual content.
 int contentLength()
          The content length.
 boolean contentThreadSafe()
          Can the content byte[] be used only with this thread (false), or by any thread (true).
 String contentType()
           
 byte[] prefixContent()
           
 int prefixContentLength()
           
 RestStatus status()
           
 byte[] suffixContent()
           
 int suffixContentLength()
           
 

Method Detail

contentThreadSafe

boolean contentThreadSafe()
Can the content byte[] be used only with this thread (false), or by any thread (true).


contentType

String contentType()

content

byte[] content()
               throws IOException
Returns the actual content. Note, use contentLength() in order to know the content length of the byte array.

Throws:
IOException

contentLength

int contentLength()
                  throws IOException
The content length.

Throws:
IOException

prefixContent

byte[] prefixContent()

prefixContentLength

int prefixContentLength()

suffixContent

byte[] suffixContent()

suffixContentLength

int suffixContentLength()

status

RestStatus status()


Copyright © 2009-2012. All Rights Reserved.