Possible Duplicate:
Can we convert a byte array into an InputStream in Java?
There is a way to convert an array of bytes (byte[]
) to InputStream in Java? I looked at some methods in Apache Commons IO, but found nothing.
ByteArrayInputStream
extends InputStream
:
InputStream myInputStream = new ByteArrayInputStream(myBytes);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With