Hai, how can i convert an string in to an InputStream, as InputStreams are byte oriented how is it possible. I checked java InputSteam API but i couldnt get an idea .
The solution is not too bad, just not very obvious ... try this... String yourString = "This is a string!"; ByteArrayInputStream bais = new ByteArrayInputStream(yourString.getBytes()); InputStream inStream = bais; That should do the trick.