SyntaxFix
Write A Post
Hire A Developer
Questions
Theres the ByteArrayInputStream.
It does exactly this.