コード例 #1
0
 private void _read()
 {
     _type    = m_io.ReadU1();
     _magic   = m_io.EnsureFixedContents(new byte[] { 67, 68, 48, 48, 49 });
     _version = m_io.ReadU1();
     if (Type == 0)
     {
         _volDescBootRecord = new VolDescBootRecord(m_io, this, m_root);
     }
     if (Type == 1)
     {
         _volDescPrimary = new VolDescPrimary(m_io, this, m_root);
     }
 }
コード例 #2
0
 private void _read()
 {
     _type  = m_io.ReadU1();
     _magic = m_io.ReadBytes(5);
     if (!((KaitaiStream.ByteArrayCompare(Magic, new byte[] { 67, 68, 48, 48, 49 }) == 0)))
     {
         throw new ValidationNotEqualError(new byte[] { 67, 68, 48, 48, 49 }, Magic, M_Io, "/types/vol_desc/seq/1");
     }
     _version = m_io.ReadU1();
     if (Type == 0)
     {
         _volDescBootRecord = new VolDescBootRecord(m_io, this, m_root);
     }
     if (Type == 1)
     {
         _volDescPrimary = new VolDescPrimary(m_io, this, m_root);
     }
 }