code: public static Stream fromString(String str) {
          if (str == null || str.isEmpty()) {
              throw new IllegalArgumentException("Cannot create a stream from an empty or null string");
          }
          Stream stream = new Stream();
          stream.hash = str;
          return stream;
      }
docs: /*
  Create a stream instance containing only a hash
  
  @param str the hash obtained from DataSift for a stream
  @return an instance which can be used by the client