Example #1
0
        public static string ReadStringFromStream(Stream aStream)
        {
            long strLength = I3Stream.ReadInt64FromStream(aStream);

            byte[] strBytes = new byte[strLength];
            aStream.Read(strBytes, 0, strBytes.Length);
            string str = Encoding.Unicode.GetString(strBytes);

            return(str);
        }
Example #2
0
        public static DateTime ReadDateTimeFromStream(Stream aStream)
        {
            string aStr = I3Stream.ReadStringFromStream(aStream);

            return(I3DateTimeUtil.ConvertStringToDateTime(aStr));
        }
Example #3
0
        public static void WriteDateTimeToStream(DateTime aDateTime, Stream aStream)
        {
            string aStr = I3DateTimeUtil.ConvertDateTimeToDateTimeString(aDateTime);

            I3Stream.WriteStringToStream(aStr, aStream);
        }