private static void WriteInteger(MemoryStream nstream, int nvalue) { byte[] nbyte = StreamUtil.IntToByteArray(nvalue); nstream.Write(nbyte, 0, 4); }