How do you retrieve the data written to a `ByteArrayOutputStream`?
You can directly access the internal buffer of `ByteArrayOutputStream` to get the written data.
Thatâ€™s not correct. You canâ€™t directly access the internal buffer, but you can use `toByteArray()` to get the data.
What method would you use to get the contents of the `ByteArrayOutputStream` as a byte array?