/// <exception cref="System.IO.IOException"/>
 private void LoadStringTableSection(InputStream @in)
 {
     FsImageProto.StringTableSection s = FsImageProto.StringTableSection.ParseDelimitedFrom
                                             (@in);
     ctx.stringTable = new string[s.GetNumEntry() + 1];
     for (int i = 0; i < s.GetNumEntry(); ++i)
     {
         FsImageProto.StringTableSection.Entry e = FsImageProto.StringTableSection.Entry.ParseDelimitedFrom
                                                       (@in);
         ctx.stringTable[e.GetId()] = e.GetStr();
     }
 }
示例#2
0
 /// <exception cref="System.IO.IOException"/>
 internal static string[] LoadStringTable(InputStream @in)
 {
     FsImageProto.StringTableSection s = FsImageProto.StringTableSection.ParseDelimitedFrom
                                             (@in);
     Log.Info("Loading " + s.GetNumEntry() + " strings");
     string[] stringTable = new string[s.GetNumEntry() + 1];
     for (int i = 0; i < s.GetNumEntry(); ++i)
     {
         FsImageProto.StringTableSection.Entry e = FsImageProto.StringTableSection.Entry.ParseDelimitedFrom
                                                       (@in);
         stringTable[e.GetId()] = e.GetStr();
     }
     return(stringTable);
 }