/// <summary> /// Writes the frame to a stream. /// </summary> /// <param name="stream">The stream to write to.</param> /// <param name="version">The ID3v2 version to use in writing the frame.</param> public override void WriteToStream(Stream stream, ID3Versions version) { if (stream == null) { throw new ArgumentNullException("stream"); } Validate(version); WriteHeaderToStream(stream, version); ownerIdentifier.WriteToStream(stream); stream.Write(privateData, 0, privateData.Length); stream.Flush(); }
/// <summary> /// Writes the frame to a stream. /// </summary> /// <param name="stream">The stream to write to.</param> /// <param name="version">The ID3v2 version to use in writing the frame.</param> public override void WriteToStream(Stream stream, ID3Versions version) { if (stream == null) { throw new ArgumentNullException("stream"); } Validate(version); WriteHeaderToStream(stream, version); stream.WriteByte((byte)filename.TextEncodingType); mimeType.WriteToStream(stream); filename.WriteToStream(stream); description.WriteToStream(stream); stream.Write(encapsulatedObject, 0, encapsulatedObject.Length); stream.Flush(); }