void receive_code(int code) throws IOException, RiakError {
int len = din.readInt();
int get_code = din.read();
if (code == RiakClient.MSG_ErrorResp) {
RpbErrorResp err = com.trifork.riak.RPB.RpbErrorResp.parseFrom(din);
throw new RiakError(err);
}
if (len != 1 || code != get_code) {
throw new IOException("bad message code");
}