* @see ConversionUtil#convert(java.util.Collection)
*/
private RiakResponse handleBodyResponse(WithBodyResponse resp) {
boolean unmodified = resp.getStatusCode() == HttpStatus.SC_NOT_MODIFIED;
RiakResponse response = RiakResponse.empty(unmodified);
IRiakObject[] values = new IRiakObject[] {};
if (resp.hasSiblings()) {
values = convert(resp.getSiblings());
} else if (resp.hasObject() && !unmodified) {
values = new IRiakObject[] { convert(resp.getObject()) };
}
if (values.length > 0) {
response = new RiakResponse(CharsetUtils.utf8StringToBytes(resp.getVclock()), values);
} else {
if(resp.getVclock() != null) { // a deleted vclock
response = new RiakResponse(CharsetUtils.utf8StringToBytes(resp.getVclock()));
}
}
return response;
}