Category "bytearrayoutputstream"

Decode ByteArrayOutputStream without string it

I want a byteArray from a baos (ByteArrayOutputStream) but the baos contains some special characters (like '&' ) so I use StringEscapeUtils.unescapeHtml to

ByteArrayOutPutSteam to Byte[] not working as expected [duplicate]

I need to make a Byte[] out of a ByteArrayOutputStream, but this is not working. When I log the outcome of baos.toByteArray(); it only shows m