code: private Object decodeResult(IoBuffer data) {
          log.debug("decodeResult - data limit: {}", (data != null ? data.limit() : 0));
          processHeaders(data);
  
          Input input = new Input(data);
          String target = null;
  
          byte b = data.get();
          //look for SOH
          if (b == 0) {
              log.debug("NUL: {}", b); //0
              log.debug("SOH: {}", data.get()); //1
          } else if (b == 1) {
              log.debug("SOH: {}", b); //1			
          }
  
          int targetUriLength = data.getShort();
          log.debug("targetUri length: {}", targetUriLength);
          target = input.readString(targetUriLength);
  
          log.debug("NUL: {}", data.get()); //0
  
          //should be junk bytes ff, ff, ff, ff
          int count = data.getInt();
          if (count == -1) {
              log.debug("DC1: {}", data.get()); //17
              count = 1;
          } else {
              data.position(data.position() - 4);
              count = data.getShort();
          }
  
          if (count != 1) {
              throw new RuntimeException("Expected exactly one result but got " + count);
          }
  
          String[] targetParts = target.split("[/]");
          if (targetParts.length > 1) {
              log.debug("Result sequence number: {}", targetParts[1]);
              target = targetParts[2];
          } else {
              target = target.substring(1);
          }
          log.debug("Target: {}", target);
          if ("onResult".equals(target)) {
              //read return value
              return input.readObject();
          } else if ("onStatus".equals(target)) {
              //read return value
              return input.readObject();
          }
          //read return value
          return Deserializer.deserialize(input, Object.class);
      }
docs: Decode response received from remoting server.
  
  @param data
  Result data to decode
  @return Object deserialized from byte buffer data