Reads all data from the current position to the end of this stream into a byte array.
public byte[] readToEnd()
Returns a byte array containing the data read.
IOException thrown if an I/O error occurs or if the stream does not support reading.
If the current position is at the beginning of the stream, this is equivalent to reading the entire stream into a byte array. If the read operation is successful, the current position is at the end of the stream.
See Also IByteStream.read, readBytes