org.elasticsearch.rest
Class BytesRestResponse
java.lang.Object
org.elasticsearch.rest.AbstractRestResponse
org.elasticsearch.rest.BytesRestResponse
- All Implemented Interfaces:
- RestResponse
public class BytesRestResponse
- extends AbstractRestResponse
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BytesRestResponse
public BytesRestResponse(byte[] bytes,
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).
contentType
public java.lang.String contentType()
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()