How to convert outputStream to a byte array?

hellzone :

How can I convert an OutputStream to a byte array? I have found that first I need to convert this OutputStream to a ByteArrayOutputStream. There is only write() method in this OutputStream class and I don't know what to do. Is there any idea?

washcloth :

Create a ByteArrayOutputStream.

Grab its content by calling toByteArray()

Reference

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related