1 | package org.farng.mp3.lyrics3; |
2 | |
3 | import org.farng.mp3.InvalidTagException; |
4 | import org.farng.mp3.object.ObjectStringSizeTerminated; |
5 | |
6 | import java.io.RandomAccessFile; |
7 | |
8 | /** |
9 | * Extended Track Title. The extended Album, Artist and Track are an extension to the fields in the ID3v1 tag - which |
10 | * are limited to 30 chars. If these extended fields exist, make sure their first 30 chars are exactly the same as the |
11 | * ones in the ID3v1 tag. If they are the same, display the extended field. If not, display the one from the ID tag. |
12 | * These 'mismatched' extended fields, should be removed when saving the lyrics tag. When saving the extended fields, |
13 | * make sure to copy the first 30 chars of each field to the ID3 tag matching fields. It is recommended NOT to save |
14 | * extended fields at all, if they are not larger then 30 chars. |
15 | * |
16 | * @author Eric Farng |
17 | * @version $Revision: 1.4 $ |
18 | */ |
19 | public class FieldBodyETT extends AbstractLyrics3v2FieldBody { |
20 | |
21 | /** |
22 | * Creates a new FieldBodyETT object. |
23 | */ |
24 | public FieldBodyETT() { |
25 | super(); |
26 | } |
27 | |
28 | /** |
29 | * Creates a new FieldBodyETT object. |
30 | */ |
31 | public FieldBodyETT(final FieldBodyETT body) { |
32 | super(body); |
33 | } |
34 | |
35 | /** |
36 | * Creates a new FieldBodyETT object. |
37 | */ |
38 | public FieldBodyETT(final String title) { |
39 | setObject("Title", title); |
40 | } |
41 | |
42 | /** |
43 | * Creates a new FieldBodyETT object. |
44 | */ |
45 | public FieldBodyETT(final RandomAccessFile file) throws InvalidTagException, java.io.IOException { |
46 | this.read(file); |
47 | } |
48 | |
49 | public String getIdentifier() { |
50 | return "ETT"; |
51 | } |
52 | |
53 | public void setTitle(final String title) { |
54 | setObject("Title", title); |
55 | } |
56 | |
57 | public String getTitle() { |
58 | return (String) getObject("Title"); |
59 | } |
60 | |
61 | protected void setupObjectList() { |
62 | appendToObjectList(new ObjectStringSizeTerminated("Title")); |
63 | } |
64 | } |