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 Album name. The extended Album, Artist and Track are an extension to the fields in the ID3v1 tag - which are |
10 | * limited to 30 chars. If these extended fields exist, make sure their first 30 chars are exactly the same as the ones |
11 | * in the ID3v1 tag. If they are the same, display the extended field. If not, display the one from the ID tag. These |
12 | * 'mismatched' extended fields, should be removed when saving the lyrics tag. When saving the extended fields, make |
13 | * sure to copy the first 30 chars of each field to the ID3 tag matching fields. It is recommended NOT to save extended |
14 | * 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 FieldBodyEAL extends AbstractLyrics3v2FieldBody { |
20 | |
21 | /** |
22 | * Creates a new FieldBodyEAL object. |
23 | */ |
24 | public FieldBodyEAL() { |
25 | super(); |
26 | } |
27 | |
28 | /** |
29 | * Creates a new FieldBodyEAL object. |
30 | */ |
31 | public FieldBodyEAL(final FieldBodyEAL body) { |
32 | super(body); |
33 | } |
34 | |
35 | /** |
36 | * Creates a new FieldBodyEAL object. |
37 | */ |
38 | public FieldBodyEAL(final String album) { |
39 | setObject("Album", album); |
40 | } |
41 | |
42 | /** |
43 | * Creates a new FieldBodyEAL object. |
44 | */ |
45 | public FieldBodyEAL(final RandomAccessFile file) throws InvalidTagException, java.io.IOException { |
46 | this.read(file); |
47 | } |
48 | |
49 | public void setAlbum(final String album) { |
50 | setObject("Album", album); |
51 | } |
52 | |
53 | public String getAlbum() { |
54 | return (String) getObject("Album"); |
55 | } |
56 | |
57 | public String getIdentifier() { |
58 | return "EAL"; |
59 | } |
60 | |
61 | protected void setupObjectList() { |
62 | appendToObjectList(new ObjectStringSizeTerminated("Album")); |
63 | } |
64 | } |