toByteArray

Converts the InputStream into a byte array and close it.

Return

The byte array of the InputStream.