Reads some number of bytes from the audio input stream and stores them into
the buffer array
b
. The number of bytes actually read is
returned as an integer. This method blocks until input data is
available, the end of the stream is detected, or an exception is thrown.
This method will always read an integral number of frames.
If the length of the array is not an integral number
of frames, a maximum of b.length - (b.length % frameSize)
bytes will be read.
Returns:
the total number of bytes read into the buffer, or -1 if there
is no more data because the end of the stream has been reached
Parameters:
- b - the buffer into which the data is read
Throws:
- IOException - if an input or output error occurs
See Also:
AudioInputStream.read(byte[], int, int)
,
AudioInputStream.read()
,
AudioInputStream.available()
,