code: public static SObject of(String key, byte[] buf, int len) {
          if (len <= 0) {
              return of(key, new byte[0]);
          }
          if (len >= buf.length) {
              return of(key, buf);
          }
          byte[] ba = new byte[len];
          System.arraycopy(buf, 0, ba, 0, len);
          return of(key, ba);
      }
docs: Construct an SObject with specified key, byte array and number of bytes
  @param key the key
  @param buf the source byte array
  @param len the number of bytes in the array should be stored in the returing object
  @return an SObject as described above