Skip to content

Instantly share code, notes, and snippets.

@vorburger
Created January 21, 2013 23:23
Show Gist options
  • Select an option

  • Save vorburger/4590507 to your computer and use it in GitHub Desktop.

Select an option

Save vorburger/4590507 to your computer and use it in GitHub Desktop.
How to best obtain an InputStream from a String (e.g. to pass it to an API dealing only with InputStream, such as an Eclipse org.eclipse.core.resources.IFile create().
InputStream is = new ByteArrayInputStream(xmlString.getBytes(Charsets.UTF_8));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment