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,
XContentBuilder builder)
throws IOException
- Throws:
IOException
builder
public XContentBuilder builder()
contentType
public 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 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:
IOException
contentLength
public int contentLength()
throws IOException
- Description copied from interface:
RestResponse
- The content length.
- Throws:
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
Copyright © 2009-2012. All Rights Reserved.