1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
//
// TextBox.cs
//
// Author:
// Alan McGovern <alan.mcgovern@gmail.com>
//
// Copyright (c) 2012 Alan McGovern
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using TagLib.Mpeg4;
namespace TagLib
{
public class TextBox : Box
{
#region Private Fields
/// <summary>
/// Contains the box's data.
/// </summary>
private ByteVector data;
#endregion
#region Constructors
/// <summary>
/// Constructs and initializes a new instance of <see
/// cref="UnknownBox" /> with a provided header and handler
/// by reading the contents from a specified file.
/// </summary>
/// <param name="header">
/// A <see cref="BoxHeader" /> object containing the header
/// to use for the new instance.
/// </param>
/// <param name="file">
/// A <see cref="TagLib.File" /> object to read the contents
/// of the box from.
/// </param>
/// <param name="handler">
/// A <see cref="IsoHandlerBox" /> object containing the
/// handler that applies to the new instance.
/// </param>
/// <exception cref="ArgumentNullException">
/// <paramref name="file" /> is <see langword="null" />.
/// </exception>
public TextBox (BoxHeader header, TagLib.File file,
IsoHandlerBox handler)
: base (header, handler)
{
if (file == null)
throw new ArgumentNullException ("file");
this.data = LoadData (file);
}
#endregion
#region Public Properties
/// <summary>
/// Gets and sets the box data contained in the current
/// instance.
/// </summary>
/// <value>
/// A <see cref="ByteVector" /> object containing the box
/// data contained in the current instance.
/// </value>
public override ByteVector Data {
get {return data;}
set {data = value;}
}
#endregion
}
}
|