/// <summary> /// 从position位置获取字符串 /// </summary> /// <param name="position">起始位置</param> /// <returns></returns> public string GetString(long position) { FileIn.Seek(position, SeekOrigin.Begin); // 定位流至数据块处 int B = 0; List <byte> tmp = new List <byte>(); while ((B = FileIn.ReadByte()) != 0) // 一直读取到0 { tmp.Add((byte)B); } string Str = Byter.ToStr_UTF8(tmp.ToArray()); return(Str); }
/// <summary> /// 获取Field的字符串形式值 /// </summary> /// <param name="fieldName"></param> /// <returns></returns> public string GetField_Str(string fieldName) { byte[] data = GetFieldBytes(fieldName); return(Byter.ToStr_UTF8(data)); }