public static InputSource createInputSource(String s){
  try {
    return new InputSource(new ByteArrayInputStream(s.getBytes("UTF-8")));
  }
 catch (  UnsupportedEncodingException e) {
    throw new RuntimeException(e);
  }
}

public static InputSource createInputSource ( String s ) { try { return new InputSource ( new ByteArrayInputStream ( s . getBytes ( "UTF-8" ) ) ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } }
create an inputsource form a string .
