Read() 공개 메소드

读取所有数据
public Read ( ) : byte[]
리턴 byte[]
예제 #1
0
파일: VFS.File.cs 프로젝트: bwbwbwbw/vfs
            /// <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);
            }
예제 #2
0
        /// <summary>
        /// 从存储介质上载入该目录
        /// </summary>
        public void Load()
        {
            byte[]       bytes = inode.Read();
            MemoryStream ms    = new MemoryStream(bytes);

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