org.elasticsearch.rest
Class XContentRestResponse
java.lang.Object
org.elasticsearch.rest.AbstractRestResponse
org.elasticsearch.rest.XContentRestResponse
- All Implemented Interfaces:
- RestResponse
- Direct Known Subclasses:
- XContentThrowableRestResponse
public class XContentRestResponse
- extends AbstractRestResponse
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XContentRestResponse
public XContentRestResponse(RestRequest request,
RestStatus status)
XContentRestResponse
public XContentRestResponse(RestRequest request,
RestStatus status,
XContentBuilder builder)
throws java.io.IOException
- Throws:
java.io.IOException
builder
public XContentBuilder builder()
contentType
public java.lang.String contentType()
contentThreadSafe
public boolean contentThreadSafe()
- Description copied from interface:
RestResponse
- Can the content byte[] be used only with this thread (false), or by any thread (true).
content
public byte[] content()
throws java.io.IOException
- Description copied from interface:
RestResponse
- Returns the actual content. Note, use
RestResponse.contentLength()
in order to know the
content length of the byte array.
- Throws:
java.io.IOException
contentLength
public int contentLength()
throws java.io.IOException
- Description copied from interface:
RestResponse
- The content length.
- Throws:
java.io.IOException
status
public RestStatus status()
prefixContent
public byte[] prefixContent()
- Specified by:
prefixContent
in interface RestResponse
- Overrides:
prefixContent
in class AbstractRestResponse
prefixContentLength
public int prefixContentLength()
- Specified by:
prefixContentLength
in interface RestResponse
- Overrides:
prefixContentLength
in class AbstractRestResponse
suffixContent
public byte[] suffixContent()
- Specified by:
suffixContent
in interface RestResponse
- Overrides:
suffixContent
in class AbstractRestResponse
suffixContentLength
public int suffixContentLength()
- Specified by:
suffixContentLength
in interface RestResponse
- Overrides:
suffixContentLength
in class AbstractRestResponse