If you need to make a string into an input stream it is really easy. Many people say you shouldnt convert a string into an input stream and that it is bad code design though. Since I was using someone elses library that only took input streams and all of my input was created as strings i really had no choice but to do the conversion (which is wastefull of memory cause you essentially have exact copies of the same data). Making a string into an inputstream can be done like this: ByteArrayInputStream bs = new ByteArrayInputStream(site.getBytes()); If you have any problems leave a comment.



blog comments powered by Disqus
Dan Mayer Profile Pic
Welcome to Dan Mayer's development blog. I primary write about Ruby development, distributed teams, and dev/PM process. The archives go back to my first CS classes during college when I was first learning programming. I contribute to a few OSS projects and often work on my own projects, You can find my code on github.

Twitter @danmayer

Github @danmayer