int totalCopied = 0; int nTimesRead0 = 0; while (hasMoreData() && totalCopied < length) { int nSamplesToCopy = length - totalCopied; if (nSamplesToCopy > byteBuf.length / bytesPerSample) {
int totalCopied = 0; int nTimesRead0 = 0; while (hasMoreData() && totalCopied < length) { int nSamplesToCopy = length - totalCopied; if (nSamplesToCopy > byteBuf.length / bytesPerSample) {