(Stream stream, int count)
| 379 | } |
| 380 | |
| 381 | private static byte[] ReadExactly(Stream stream, int count) |
| 382 | { |
| 383 | var bytes = new byte[count]; |
| 384 | var offset = 0; |
| 385 | while (offset < count) |
| 386 | { |
| 387 | var read = stream.Read(bytes, offset, count - offset); |
| 388 | if (read == 0) |
| 389 | { |
| 390 | throw new EndOfStreamException("Unexpected end of stream."); |
| 391 | } |
| 392 | |
| 393 | offset += read; |
| 394 | } |
| 395 | |
| 396 | return bytes; |
| 397 | } |
| 398 | |
| 399 | private static ushort ReadUInt16BigEndian(Stream stream) |
| 400 | { |
nothing calls this directly
no outgoing calls
no test coverage detected