public Id3v1Tag(File file, long tagOffset) { this.file = file; this.tagOffset = tagOffset; Read(); }
protected void Read(File file) { if (file == null) return; try { file.Mode = FileAccessMode.Read; } catch (TagLibException) { return; } file.Seek(tagOffset); footer.SetData(file.ReadBlock((int)ApeFooter.Size)); if (footer.TagSize == 0 || footer.TagSize > (uint)file.Length) return; file.Seek(tagOffset + ApeFooter.Size - footer.TagSize); Parse(file.ReadBlock((int)(footer.TagSize - ApeFooter.Size))); }
public Id3v2Tag(File file, long tagOffset) : this() { this.tagOffset = tagOffset; Read(file); }