2
* @author : Paul Taylor
5
* Version @version:$Id: FrameBodyTIPL.java,v 1.10 2007/08/06 16:04:34 paultaylor Exp $
7
* MusicTag Copyright (C)2003,2004
9
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
10
* General Public License as published by the Free Software Foundation; either version 2.1 of the License,
11
* or (at your option) any later version.
13
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
14
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
* See the GNU Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public License along with this library; if not,
18
* you can get a copy from http://www.opensource.org/licenses/lgpl-license.php or write to the Free Software
19
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
package org.jaudiotagger.tag.id3.framebody;
27
import org.jaudiotagger.tag.InvalidTagException;
28
import org.jaudiotagger.tag.datatype.DataTypes;
29
import org.jaudiotagger.tag.datatype.PairedTextEncodedStringNullTerminated;
30
import org.jaudiotagger.tag.id3.ID3v24Frames;
32
import java.nio.ByteBuffer;
36
* The 'Involved people list' is intended as a mapping between functions like producer and names. Every odd field is a
37
* function and every even is an name or a comma delimited list of names.
39
* TODO currently just reads the first String when directly from file, this will be fixed when we add support for
40
* multiple Strings for all ID3v24Frames
42
* TODO currently just reads all the values when converted from the corresponding ID3v23 Frame IPLS as a single value
43
* (the individual fields from the IPLS frame will be seperated by commas)
46
public class FrameBodyTIPL
47
extends AbstractFrameBodyTextInfo implements ID3v24FrameBody
50
* Creates a new FrameBodyTIPL datatype.
52
public FrameBodyTIPL()
56
public FrameBodyTIPL(FrameBodyTIPL body)
62
* Convert from V3 to V4 Frame
64
public FrameBodyTIPL(FrameBodyIPLS body)
66
setObjectValue(DataTypes.OBJ_TEXT_ENCODING, body.getTextEncoding());
68
PairedTextEncodedStringNullTerminated.ValuePairs value
69
= (PairedTextEncodedStringNullTerminated.ValuePairs)body.getObjectValue(DataTypes.OBJ_TEXT);
70
setObjectValue(DataTypes.OBJ_TEXT, value.toString());
74
* Creates a new FrameBodyTIPL datatype.
79
public FrameBodyTIPL(byte textEncoding, String text)
81
super(textEncoding, text);
85
* Creates a new FrameBodyTIPL datatype.
87
* @throws InvalidTagException
89
public FrameBodyTIPL(ByteBuffer byteBuffer, int frameSize)
90
throws InvalidTagException
92
super(byteBuffer, frameSize);
96
* The ID3v2 frame identifier
98
* @return the ID3v2 frame identifier for this frame type
100
public String getIdentifier()
102
return ID3v24Frames.FRAME_ID_INVOLVED_PEOPLE;