int numBytesRead = 0; while (numBytesRead != 6) { int bRead = streamResource.Read(mbapHeader, numBytesRead, 6 - numBytesRead); if (bRead == 0) throw new IOException("Read resulted in 0 bytes returned."); numBytesRead += bRead; } Debug.WriteLine("MBAP header: {0}", mbapHeader....