protected override void ParseFields(ByteVector data, byte version) { ByteVectorCollection fields = ByteVectorCollection.Split(data, (byte)0); if (fields.Count != 2) { return; } owner = fields[0].ToString(StringType.Latin1); identifier = fields[1]; }
/// <summary> /// Populates the values in the current instance by parsing /// its field data in a specified version. /// </summary> /// <param name="data"> /// A <see cref="ByteVector" /> object containing the /// extracted field data. /// </param> /// <param name="version"> /// A <see cref="byte" /> indicating the ID3v2 version the /// field data is encoded in. /// </param> protected override void ParseFields(ByteVector data, byte version) { if (data.Count < 1) { throw new CorruptFileException("A private frame must contain at least 1 byte."); } var l = ByteVectorCollection.Split(data, ByteVector.TextDelimiter(StringType.Latin1), 1, 2); if (l.Count == 2) { Owner = l[0].ToString(StringType.Latin1); PrivateData = l[1]; } }