Reputation: 1291
How to convert string to stream in java without using bytearrayinputstream and example?
Upvotes: 0
Views: 597
Reputation: 346536
You could extend the InputStream
class and implement the read()
method such that it returns data from a String.
But it would be really useless to do that when using a ByteArrayInputStream
is so much simpler and easier.
Upvotes: 2