When you call the recorder.read(...)
function, the sizeInBytes parameter specifies how many bytes you want to read from the internal buffer starting from the oldest data not yet read in the buffer. The offsetInBytes parameter refers to the array you pass in, not the internal buffer.
If you want to read out the entire buffer (50ms) then you need to pass in an array (of length >= 2205000) and a sizeInBytes of 2205000. If you only want the most recent 10 seconds, then you still have to read out the entire buffer, and the most recent 10 seconds will be the last 441000 of the bytes that are returned. Note that you will not necessarily always get 2205000 bytes returned; if you try and read this amount of data at intervals < 50ms then you will just get whatever data is available at each read. But the most recent data will always be at the end of the data that is returned.