public byte [] BinaryRead (int count)
{
if (count < 0)
throw new ArgumentException ("count is < 0");
Stream s = InputStream;
byte [] ret = new byte [count];
if (s.Read (ret, 0, count) != count)
throw new ArgumentException (
String.Format ("count {0} exceeds length of available input {1}",
count, s.Length - s.Position));
return ret;
}