Achamenes.ID3.Fields.UnicodeTextField.WriteToStream C# (CSharp) Method

WriteToStream() public method

public WriteToStream ( System stream ) : void
stream System
return void
        public override void WriteToStream(System.IO.Stream stream)
        {
            byte[] buffer=Encoding.Unicode.GetBytes(this.Text);
            stream.WriteByte(0xff);					// first byte of BOM
            stream.WriteByte(0xfe);					// second byte of BOM
            stream.Write(buffer, 0, buffer.Length);	// char data
            stream.WriteByte(0);					// null terminator
            stream.WriteByte(0);					// null terminator
        }