9 foreach (
char c
in test)
11 if (c >
'~' || c <
' ')
21 int num = bytesToRead;
41 int year = (int)(1980 + (dateTime >> 25));
42 int month = (int)((dateTime >> 21) & 0xF);
43 int day = (int)((dateTime >> 16) & 0x1F);
44 int hour = (int)((dateTime >> 11) & 0x1F);
45 int minute = (int)((dateTime >> 5) & 0x3F);
46 int second = (int)((dateTime & 0x1F) * 2);
49 return new DateTime(
year, month, day, hour, minute, second, 0);
63 int num = (dateTime.Year - 1980) & 0x7F;
64 num = (num << 4) + dateTime.
Month;
65 num = (num << 5) + dateTime.
Day;
66 num = (num << 5) + dateTime.
Hour;
67 num = (num << 6) + dateTime.
Minute;
68 return (uint)((num << 5) + dateTime.
Second / 2);
73 int bufferPointer = 0;
75 byte[]
array =
new byte[32];
79 while (!flag2 && !flag && num2 <= maxBytesToRead)
82 while (bufferPointer >= 0 && !flag2)
84 num = (num << 8) |
array[bufferPointer];
85 if (num == signatureToFind)
106 long num = position -
stream.Position;
109 int count = (int)((num > 64) ? 64 : num);
126 bufferPointer = buffer.Length - 1;
129 int num = (int)
stream.Position;
133 bufferPointer = num - 1;
static bool RequiresUnicode(string test)
static readonly DateTime s_invalidDateIndicator
static void ReadBytes(Stream stream, byte[] buffer, int bytesToRead)
static DateTime DosTimeToDateTime(uint dateTime)
static bool SeekBackwardsToSignature(Stream stream, uint signatureToFind, int maxBytesToRead)
static bool SeekBackwardsAndRead(Stream stream, byte[] buffer, out int bufferPointer)
static uint DateTimeToDosTime(DateTime dateTime)
static void AdvanceToPosition(this Stream stream, long position)
static string UnexpectedEndOfStream