code: protected byte[] flattenRequest (NodeRequest request)
      {
          try {
              ByteArrayOutputStream bout = new ByteArrayOutputStream();
              ObjectOutputStream oout = new ObjectOutputStream(bout);
              oout.writeObject(request);
              return bout.toByteArray();
          } catch (Exception e) {
              throw new IllegalArgumentException(
                  "Failed to serialize node request [request=" + request + "].", e);
          }
      }
docs: Flattens the supplied node request into bytes.