}
RiakResponse response = RiakResponse.empty();
com.basho.riak.client.http.RiakObject riakObject = convert(object, client);
RequestMeta requestMeta = convert(storeMeta);
StoreResponse resp = client.store(riakObject, requestMeta);
if (!resp.isSuccess()) {
if (resp.getStatusCode() == HttpStatus.SC_PRECONDITION_FAILED) {
if (storeMeta.hasIfNoneMatch() && storeMeta.getIfNoneMatch()) {
throw new MatchFoundException();
} else if (storeMeta.hasIfNotModified() && storeMeta.getIfNotModified()) {
throw new ModifiedException();
}
}
throw new IOException(resp.getStatusCode() + " " + resp.getBodyAsString());
}
if (storeMeta.hasReturnBody() && storeMeta.getReturnBody()) {
response = handleBodyResponse(resp);
} else if(storeMeta.hasReturnHead() && storeMeta.getReturnHead()) {