Read() public method

读取所有数据
public Read ( ) : byte[]
return byte[]
Beispiel #1
0
            /// <summary>
            /// 读取从当前位置开始所有数据
            /// </summary>
            /// <param name="array"></param>
            /// <returns></returns>
            public UInt32 Read(byte[] array)
            {
                if (position >= inode.data.sizeByte)
                {
                    return(0);
                }
                var count = inode.data.sizeByte - position;

                inode.Read(position, array, count);
                position += count;
                return(count);
            }
Beispiel #2
0
        /// <summary>
        /// 从存储介质上载入该目录
        /// </summary>
        public void Load()
        {
            byte[]       bytes = inode.Read();
            MemoryStream ms    = new MemoryStream(bytes);

            entries = Serializer.Deserialize <Dictionary <String, UInt32> >(ms);
        }