private ReadTheBody ( byte buffer, int offset, int count ) : int | ||
buffer | byte | |
offset | int | |
count | int | |
return | int |
int ReadTheBody(byte[] buffer, int offset, int count)
{
int bytesRead = 0;
for (int i = 0; i < count; i++) {
int index = offset + i;
if (TheRealBodyBytes == null || index >= TheRealBodyBytes.Length)
break; // the TheRealBodyBytes doesn't have this index
else {
bytesRead++;
buffer[i] = TheRealBodyBytes[index];
}
}
return bytesRead;
}