code: public static InputStream getStream(String string) {
          try {
              return new ByteArrayInputStream(string.getBytes("UTF-8"));
          } catch (UnsupportedEncodingException wontHappen) {
              throw new FaultException(wontHappen);
          }
      }
docs: Gets a stream for the given string.