See ByteArrayInputStream( string.getBytes() ) I bet it does what you need.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Yes - but beware that uses your platform's default encoding, which may or may not be appropriate, depending what the InputStream is used for. So you may want to specifiy a particular encoding, e.g.